Skip to content

Uploading large JPG image files > 2GB #3172

Closed Answered by melloware
johndoegpt asked this question in PrimeFaces
Discussion options

You must be logged in to vote

ok try this in /src/main/webapp/resources/test.js add this code.

https://github.com/primefaces/primefaces-test/blob/master/src/main/webapp/resources/test.js

It removes trying the preview entirely...

if (PrimeFaces.widget.FileUpload) {
  PrimeFaces.widget.FileUpload.prototype.addFileToRow = function(file, data) {
    if (this.emptyFacet.length > 0) {
      this.emptyFacet.hide();
      this.filesFacet.parent().show();
    }

    var $this = this,
      row = $('<div class="ui-fileupload-row"></div>')
      .append('<div class="ui-fileupload-preview"></td>')
      .append('<div class="ui-fileupload-filename">' + PrimeFaces.escapeHTML(file.name) + '</div>')
      .append('<div>' + PrimeFaces.u…

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@melloware
Comment options

Answer selected by melloware
Comment options

You must be logged in to vote
1 reply
@melloware
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Help Wanted Extra attention is needed
2 participants