diff --git a/src/CONST.js b/src/CONST.js index 2b8aece7816..031b251bcb0 100755 --- a/src/CONST.js +++ b/src/CONST.js @@ -35,64 +35,6 @@ const CONST = { ARROW_HIDE_DELAY: 3000, API_ATTACHMENT_VALIDATIONS: { - // Same as the PHP layer allows - /* eslint-disable-next-line max-len */ - UNALLOWED_EXTENSIONS: [ - 'ade', - 'adp', - 'apk', - 'appx', - 'appxbundle', - 'bat', - 'cab', - 'chm', - 'cmd', - 'com', - 'cpl', - 'diagcab', - 'diagcfg', - 'diagpack', - 'dll', - 'dmg', - 'ex', - 'ex_', - 'exe', - 'hta', - 'img', - 'ins', - 'iso', - 'isp', - 'jar', - 'jnlp', - 'js', - 'jse', - 'lib', - 'lnk', - 'mde', - 'msc', - 'msi', - 'msix', - 'msixbundle', - 'msp', - 'mst', - 'nsh', - 'pif', - 'ps1', - 'scr', - 'sct', - 'shb', - 'sys', - 'vb', - 'vbe', - 'vbs', - 'vhd', - 'vxd', - 'wsc', - 'wsf', - 'wsh', - 'xll', - ], - // 24 megabytes in bytes, this is limit set on servers, do not update without wider internal discussion MAX_SIZE: 25165824, diff --git a/src/components/AttachmentModal.js b/src/components/AttachmentModal.js index 7bfd6e30f39..dbfdefe7a0f 100755 --- a/src/components/AttachmentModal.js +++ b/src/components/AttachmentModal.js @@ -184,16 +184,6 @@ function AttachmentModal(props) { * @returns {Boolean} */ const isValidFile = useCallback((_file) => { - const {fileExtension} = FileUtils.splitExtensionFromFileName(lodashGet(_file, 'name', '')); - if (_.contains(CONST.API_ATTACHMENT_VALIDATIONS.UNALLOWED_EXTENSIONS, fileExtension.toLowerCase())) { - const invalidReason = 'attachmentPicker.notAllowedExtension'; - - setIsAttachmentInvalid(true); - setAttachmentInvalidReasonTitle('attachmentPicker.wrongFileType'); - setAttachmentInvalidReason(invalidReason); - return false; - } - if (lodashGet(_file, 'size', 0) > CONST.API_ATTACHMENT_VALIDATIONS.MAX_SIZE) { setIsAttachmentInvalid(true); setAttachmentInvalidReasonTitle('attachmentPicker.attachmentTooLarge');