Skip to content

Commit

Permalink
enhancement(Upload): changed to 50mb limit (#586)
Browse files Browse the repository at this point in the history
closes #585 

## Changes

- [enhancement(Upload): changed to 50mb
limit](38e92d4)
- content(Upload): uploaded text to specify 50mb

## How to test
- Attempt to upload a file over 50mb
- Verify it fails to upload
  • Loading branch information
shindigira authored May 28, 2024
1 parent 2e2442d commit 8a2a49e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/pages/Filing/FilingApp/FileSubmission.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import type { SubmissionResponse } from 'types/filingTypes';
import { FileSubmissionState } from 'types/filingTypes';
import { filingInstructionsPage } from 'utils/common';
import {
FILE_SIZE_LIMIT_2GB,
FILE_SIZE_LIMIT_50MB,
FILE_SIZE_LIMIT_ERROR_MESSAGE,
} from 'utils/constants';
import useInstitutionDetails from 'utils/useInstitutionDetails';
Expand Down Expand Up @@ -120,7 +120,7 @@ export function FileSubmission(): JSX.Element {
const fileSizeTest = Boolean(
event.target.files?.[0] &&
// NOTE: Change to FILE_SIZE_LIMIT_2GB to FILE_SIZE_LIMIT_2MB to test 2MB instead of 2GB
(event.target.files[0].size > FILE_SIZE_LIMIT_2GB ||
(event.target.files[0].size > FILE_SIZE_LIMIT_50MB ||
event.target.files[0].size === 0),
);

Expand Down Expand Up @@ -247,9 +247,9 @@ export function FileSubmission(): JSX.Element {
description={
<Paragraph>
Your small business lending application register (register) must
be submitted in a comma-separated values (CSV) file format and
must not exceed 2GB in size. For detailed filing specifications
reference the{' '}
be submitted in a comma-separated values (CSV) file format. For
beta, your file must not exceed 50MB. For detailed filing
specifications reference the{' '}
<Link href={filingInstructionsPage}>
Filing instructions guide for small business lending data
</Link>
Expand Down
1 change: 1 addition & 0 deletions src/utils/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export const MAX_RETRY_DELAY = 15_000;
export const Error500 = 500;
// Upload max file size limit
export const FILE_SIZE_LIMIT_2GB = 2e9; // 2 GB - 2_147_483_648
export const FILE_SIZE_LIMIT_50MB = 50e6; // 50 MB - 52_428_800
export const FILE_SIZE_LIMIT_2MB = 2e6; // 2MB - 2_097_152
export const FILE_SIZE_LIMIT_ERROR_MESSAGE =
'The file size is over the max size limit or does not contain data.';
Expand Down

0 comments on commit 8a2a49e

Please sign in to comment.