Skip to content

Commit

Permalink
Merge pull request #7623 from RocketChat/fix-unknown-file-types-uploa…
Browse files Browse the repository at this point in the history
…ding

[FIX] Uploading an unknown file type erroring out
  • Loading branch information
rodrigok authored Aug 1, 2017
2 parents e461bdb + a3585e2 commit 159d10a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/rocketchat-ui/client/lib/fileUpload.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ fileUpload = function(filesToUpload) {
return;
}

if (!RocketChat.fileUploadIsValidContentType(file.file.type)) {
if (!file.file.type || !RocketChat.fileUploadIsValidContentType(file.file.type)) {
swal({
title: t('FileUpload_MediaType_NotAccepted'),
text: file.file.type || `*.${ s.strRightBack(file.file.name, '.') }`,
Expand Down

0 comments on commit 159d10a

Please sign in to comment.