Skip to content

Commit

Permalink
fix: No error message when uploading a file that is not allowed (#31346)
Browse files Browse the repository at this point in the history
Co-authored-by: Hugo Costa <20212776+hugocostadev@users.noreply.github.com>
  • Loading branch information
Sayan4444 and hugocostadev committed Jan 2, 2024
1 parent 92a8de7 commit 9ef1442
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/lemon-shrimps-draw.md
@@ -0,0 +1,5 @@
---
"@rocket.chat/meteor": patch
---

Fixed error message when uploading a file that is not allowed
2 changes: 1 addition & 1 deletion apps/meteor/client/lib/chats/flows/uploadFiles.ts
Expand Up @@ -46,7 +46,7 @@ export const uploadFiles = async (chat: ChatAPI, files: readonly File[], resetFi
imperativeModal.close();
uploadNextFile();
},
invalidContentType: Boolean(file.type && !fileUploadIsValidContentType(file.type)),
invalidContentType: !(file.type && fileUploadIsValidContentType(file.type)),
},
});
};
Expand Down

1 comment on commit 9ef1442

@unwnstr
Copy link

@unwnstr unwnstr commented on 9ef1442 Apr 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is disrupts uploading any files with unknown extension. Please undo.

Please sign in to comment.