-
Notifications
You must be signed in to change notification settings - Fork 10.6k
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
fix: No error message when uploading a file that is not allowed #31346
Conversation
🦋 Changeset detectedLatest commit: d92f22d The changes in this PR will be included in the next version bump. This PR includes changesets to release 30 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 #31346 +/- ##
========================================
Coverage 49.36% 49.36%
========================================
Files 3311 3308 -3
Lines 81334 81294 -40
Branches 16657 16648 -9
========================================
- Hits 40148 40131 -17
+ Misses 36487 36472 -15
+ Partials 4699 4691 -8
Flags with carried forward coverage won't be shown. Click here to find out more. |
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.
LGTM 🚀
…hideUi * 'develop' of github.com:RocketChat/Rocket.Chat: (112 commits) chore: update yarn.lock chore: Replace `FramedIcon` in favor of fuselage component (#31356) chore: fix dep version Release 6.5.2 fix: wrong value used for workspace registration ci: update release PR description with change log fix: inquiries being limited to 50 items (#31267) fix: close image gallery on backdrop click (#31344) fix: No error message when uploading a file that is not allowed (#31346) fix: Text area only shows the last line of the message for very long texts #31252 #31257 (#31262) chore: adding new streamer event for imported messages (#31063) chore: adapt read receipts feature to work without oplog on msgs (#30996) chore: remove Messages model dependency of Rooms model (#31272) chore: `Card` normalization (#31335) refactor: unify useStream and useSingleStream (#31326) chore: add new msg stream for reported msgs (#31087) Bump 6.5.2 feat: Highlight words in thread messages (#31281) fix: Show only departments that are allowed on registration page on livechat widget (#31302) fix: Fallback forward department not working as expected on chat forwarding (#31296) ...
This merge broke the uploading of any files with an unknown type: |
"If the type of file which we want to upload is not clear then we should not allow it to be uploaded in the server" - We don't need it! |
Default value is |
@IgorOhrimenko the problem is that previously when u try to upload something whose file type cant be determined, not only the file was not uploaded but no error was given....thus this commit throws the error to let the end user know that this file cant be uploaded in the backend |
Ok. How to upload OVPN file ? |
ovpn file is text/plain Can we turn off media type checking at all ? |
Look like a last change is a error |
Where it was ? What path and file you are talking about ? Who should revert it ? |
In this merge in tab "Files changed" you can see a changed files. |
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.
If we can't detrminate a MIME type of a file (file.type) it will return a false and all not recognised types will be not work at all even if "Accepted Media Types" is empty.
Please revert
How do I manage the mime types to allow my files? |
I'd rather have no error message when uploading file types that are not allowed, than not be able to upload unrecognized MIME types when no restrictions are set. This should be reverted. |
Totally agree! |
Proposed changes (including videos or screenshots)
BEFORE THE FIX
https://github.com/RocketChat/Rocket.Chat/assets/112304873/68e9d8d0-3ef5-411a-93e5-d009ff97c331
AFTER THE FIX
https://github.com/RocketChat/Rocket.Chat/assets/112304873/73c161a2-3658-4b76-8276-e38dbfc6f177
REASON BEHIND CHANGES
If the type of file which we want to upload is not clear then we should not allow it to be uploaded in the server
Issue(s)
This should close issues :-
closes #27924
Steps to test or reproduce