Skip to content

Commit

Permalink
Merge pull request #55499 from nkdengineer/fix/54700
Browse files Browse the repository at this point in the history
fix: max image file size
  • Loading branch information
luacmartins authored Jan 23, 2025
2 parents fbc410f + ae21fb1 commit 8102c19
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libs/fileDownload/FileUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ const getImageDimensionsAfterResize = (file: FileObject) =>
});

const resizeImageIfNeeded = (file: FileObject) => {
if (!file || !Str.isImage(file.name ?? '') || (file?.size ?? 0) <= CONST.API_ATTACHMENT_VALIDATIONS.RECEIPT_MAX_SIZE) {
if (!file || !Str.isImage(file.name ?? '') || (file?.size ?? 0) <= CONST.API_ATTACHMENT_VALIDATIONS.MAX_SIZE) {
return Promise.resolve(file);
}
return getImageDimensionsAfterResize(file).then(({width, height}) => getImageManipulator({fileUri: file.uri ?? '', width, height, fileName: file.name ?? '', type: file.type}));
Expand Down

0 comments on commit 8102c19

Please sign in to comment.