-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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] Error when trying to show preview of undefined filetype #6935
Conversation
closes 6922 closes 6917
@@ -9,6 +9,8 @@ getUploadPreview = (file, callback) -> | |||
# If greater then 10MB don't try and show a preview | |||
if file.file.size > 10 * 1000000 | |||
callback(file, null) | |||
else if file.file.type is undefined |
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.
maybe testing any falsy
value would be safier.. what do you think? like else if not file.file.type?
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.
Of course 👍 makes sense. That's coffeescript for you lol
@sampaiodiego fixed 👍 |
[Fix] Error when trying to show preview of undefined filetype
i'm on 0.57.3. i'm able to upload an extension-less file, but trying to download it will fail in browser & do nothing in app. |
closes #6922
closes #6917
@RocketChat/core
Closes #ISSUE_NUMBER