-
Notifications
You must be signed in to change notification settings - Fork 10.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Use application/octet-stream
as a fallback media type to avoid "Unknown media type" errors
#32471
Conversation
Looks like this PR is ready to merge! 🎉 |
🦋 Changeset detectedLatest commit: 2886ac3 The changes in this PR will be included in the next version bump. This PR includes changesets to release 34 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #32471 +/- ##
===========================================
- Coverage 56.53% 55.06% -1.47%
===========================================
Files 2484 2397 -87
Lines 54693 53207 -1486
Branches 11286 10946 -340
===========================================
- Hits 30921 29300 -1621
- Misses 21122 21319 +197
+ Partials 2650 2588 -62
Flags with carried forward coverage won't be shown. Click here to find out more. |
…hub.com/RocketChat/Rocket.Chat into feat/setting-allow-upload-unknown-media
…hub.com/RocketChat/Rocket.Chat into feat/setting-allow-upload-unknown-media
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's rewrite the description please, we are mentioning Reject unknown media types
, but the name/description for the setting is completely different (which is good in my opinion)
apps/meteor/client/views/room/body/hooks/useFileUploadDropTarget.ts
Outdated
Show resolved
Hide resolved
.../client/views/room/composer/messageBox/MessageBoxActionsToolbar/hooks/useFileUploadAction.ts
Outdated
Show resolved
Hide resolved
apps/meteor/client/views/room/modals/FileUploadModal/FileUploadModal.tsx
Outdated
Show resolved
Hide resolved
…nto feat/setting-allow-upload-unknown-media
application/octet-stream
as a fallback media type to avoid "Unknown media type" errors
Proposed changes (including videos or screenshots)
application/octet-stream
as default if the new setting is disabled) to be uploaded by using aapplication/octet-stream
as the default/fallback MIME type;mime
package in the back-end too)Issue(s)
Steps to test or reproduce
Access a room and try uploading a
drawio
file in it (such as the one available in the end-to-end tests added by this PR); Expected behavior: The file should be accepted and uploaded succesfully. Check therocketchat_uploads
DB collection to confirm the file has been uploaded with theapplication/octet-stream
media type (default one for unknown media extensions);Current behavior: the file isn't accepted and an "Unknown media type not accepted" error is thrown.
Further comments
SUP-531