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
MarcosSpessatto
left a comment
There was a problem hiding this comment.
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-streamas default if the new setting is disabled) to be uploaded by using aapplication/octet-streamas the default/fallback MIME type;mimepackage in the back-end too)Issue(s)
Steps to test or reproduce
Access a room and try uploading a
drawiofile 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_uploadsDB collection to confirm the file has been uploaded with theapplication/octet-streammedia 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