Skip to content

Commit

Permalink
chore: changed upload size from 2mb to 5mb (#10320)
Browse files Browse the repository at this point in the history
  • Loading branch information
ameerul-deriv authored and vinu-deriv committed Oct 10, 2023
1 parent 2ae93cf commit 00dd88f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ describe('<OrderDetailsConfirmModal/>', () => {
).toBeInTheDocument();
expect(screen.getByText('Confirm')).toBeInTheDocument();
expect(screen.getByText('Go Back')).toBeInTheDocument();
expect(screen.getByText('We accept JPG, PDF, or PNG (up to 2MB).')).toBeInTheDocument();
expect(screen.getByText('We accept JPG, PDF, or PNG (up to 5MB).')).toBeInTheDocument();
});
it('should handle GoBack Click', () => {
const { hideModal } = useModalManagerContext();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const OrderDetailsConfirmModal = () => {
as='div'
className='order-details-confirm-modal__file_format'
>
<Localize i18n_default_text='We accept JPG, PDF, or PNG (up to 2MB).' />
<Localize i18n_default_text='We accept JPG, PDF, or PNG (up to 5MB).' />
</Text>
<FileUploaderComponent
accept='image/png, image/jpeg, image/jpg, application/pdf'
Expand Down
4 changes: 2 additions & 2 deletions packages/p2p/src/utils/file-uploader.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export const convertToMB = bytes => bytes / (1024 * 1024);

export const getPotSupportedFiles = filename => /^.*\.(png|PNG|jpg|JPG|jpeg|JPEG|pdf|PDF)$/.test(filename);

export const max_pot_file_size = 2097152;
export const max_pot_file_size = 5242880;

export const isImageType = type => ['image/jpeg', 'image/png', 'image/gif'].includes(type);

Expand All @@ -15,5 +15,5 @@ const isFileSupported = files => files.filter(each_file => getPotSupportedFiles(

export const getErrorMessage = files =>
isFileTooLarge(files) && isFileSupported(files)
? localize('Cannot upload a file over 2MB')
? localize('Cannot upload a file over 5MB')
: localize('File uploaded is not supported');

0 comments on commit 00dd88f

Please sign in to comment.