Skip to content

Commit

Permalink
Merge pull request #5787 from primefaces/issue-5786
Browse files Browse the repository at this point in the history
Fix #5786 - FileUpload component, file content for non-image file types
  • Loading branch information
gucal authored Jan 17, 2024
2 parents fa3719a + 8ea1ba4 commit 7963495
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions components/lib/fileupload/FileUpload.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,7 @@ export const FileUpload = React.memo(
let file = selectedFiles[i];

if (!isFileSelected(file) && validate(file)) {
if (isImage(file)) {
file.objectURL = window.URL.createObjectURL(file);
}
file.objectURL = window.URL.createObjectURL(file);

currentFiles.push(file);
}
Expand Down

0 comments on commit 7963495

Please sign in to comment.