Skip to content

Commit

Permalink
fix readFileAsync to extract type too
Browse files Browse the repository at this point in the history
  • Loading branch information
shubham1206agra committed Sep 30, 2023
1 parent 52f0e3c commit 0594532
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 0594532

Please sign in to comment.