From ba24eabe7c4dc2c7bf87667841fd60625e105968 Mon Sep 17 00:00:00 2001 From: Steve Faulkner Date: Fri, 2 Apr 2021 12:23:29 -0500 Subject: [PATCH] Remove File upload size check (#605) --- src/Explorer/Panes/UploadItemsPane/index.tsx | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/Explorer/Panes/UploadItemsPane/index.tsx b/src/Explorer/Panes/UploadItemsPane/index.tsx index f25c60ecd..1b2fee0ba 100644 --- a/src/Explorer/Panes/UploadItemsPane/index.tsx +++ b/src/Explorer/Panes/UploadItemsPane/index.tsx @@ -8,8 +8,6 @@ import Explorer from "../../Explorer"; import { getErrorMessage } from "../../Tables/Utilities"; import { GenericRightPaneComponent, GenericRightPaneProps } from "../GenericRightPaneComponent"; -const UPLOAD_FILE_SIZE_LIMIT_KB = 2097152; - export interface UploadItemsPaneProps { explorer: Explorer; closePanel: () => void; @@ -47,10 +45,6 @@ export const UploadItemsPane: FunctionComponent = ({ setFormError("No files specified"); setFormErrorDetail("No files were specified. Please input at least one file."); logConsoleError("Could not upload items -- No files were specified. Please input at least one file."); - } else if (_totalFileSizeForFileList(files) > UPLOAD_FILE_SIZE_LIMIT_KB) { - setFormError("Upload file size limit exceeded"); - setFormErrorDetail("Total file upload size exceeds the 2 MB file size limit."); - logConsoleError("Could not upload items -- Total file upload size exceeds the 2 MB file size limit."); } const selectedCollection = explorer.findSelectedCollection(); @@ -79,14 +73,6 @@ export const UploadItemsPane: FunctionComponent = ({ setFiles(event.target.files); }; - const _totalFileSizeForFileList = (fileList: FileList): number => { - let totalFileSize = 0; - for (let i = 0; i < fileList?.length; i++) { - totalFileSize += fileList.item(i).size; - } - return totalFileSize; - }; - const genericPaneProps: GenericRightPaneProps = { container: explorer, formError,