Skip to content

Commit

Permalink
Merge pull request #10730 from varshamb/fix-10694
Browse files Browse the repository at this point in the history
Lower case file extension for validation
  • Loading branch information
stitesExpensify authored Sep 2, 2022
2 parents ae51d1c + b5d1115 commit fffb7c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/AttachmentModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ class AttachmentModal extends PureComponent {
}

const {fileExtension} = this.splitExtensionFromFileName(lodashGet(file, 'name', ''));
if (!_.contains(CONST.API_ATTACHMENT_VALIDATIONS.ALLOWED_EXTENSIONS, fileExtension)) {
if (!_.contains(CONST.API_ATTACHMENT_VALIDATIONS.ALLOWED_EXTENSIONS, fileExtension.toLowerCase())) {
const invalidReason = `${this.props.translate('attachmentPicker.notAllowedExtension')} ${CONST.API_ATTACHMENT_VALIDATIONS.ALLOWED_EXTENSIONS.join(', ')}`;
this.setState({
isAttachmentInvalid: true,
Expand Down

0 comments on commit fffb7c3

Please sign in to comment.