Skip to content

Commit

Permalink
Merge pull request #28533 from shubham1206agra/fix-readFileAsync
Browse files Browse the repository at this point in the history
Fix readFileAsync to extract type also for file upload
  • Loading branch information
roryabraham authored Oct 1, 2023
2 parents e295c96 + 0594532 commit b403ab5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libs/fileDownload/FileUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ const readFileAsync = (path, fileName) =>
return res.blob();
})
.then((blob) => {
const file = new File([blob], cleanFileName(fileName));
const file = new File([blob], cleanFileName(fileName), {type: blob.type});
file.source = path;
// For some reason, the File object on iOS does not have a uri property
// so images aren't uploaded correctly to the backend
Expand Down

0 comments on commit b403ab5

Please sign in to comment.