-
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
How can I upload .msg file in Rocket.Chat #7074
Comments
Also running into the same issue with .hl7 and .gello files. Clearing the "Accepted Media Types" input and restarting the server does not fix it. Running snapd version on ubuntu. v0.58.2 |
@nishimaki10 pull request - #5588 File upload is completely broken if the file extension is not known by the mime-db package. I can't see any way to add custom extensions/mime-types. @MartinSchoeler I believe this should be changed to a bug. |
any eta on this one? (sorry for asking, just cause i saw this is assigned from may) |
I wonder about if 'application/octet-stream' would work. If it doesn't it means this is a bug. |
@Lawri-van-Buel to you question - it's not working |
@Lawri-van-Buel No combination works because it never actually reaches the section of code to check "Accepted Media Types" setting. If the file extension is unknown to mime-db it returns undefined or null (can't quite remember) which means the file upload process is aborted. Well before it even gets a chance to check "Accepted Media Types". This is definitely a bug. |
I think this may have been introduced accidentally by #7623 which checks for an existing type recognition before the accepted media types whitelist come into play. We encountered the same issue when uploading "unknown" file types as apple number files. We managed to patch around this by using the attached pull request. |
I am not able to send |
Indeed that's the core issue. Currently the code first checks if there is a valid, recognized file type and bails out, if there is none. Only if there is a proper file type being recognized, it actually checks the whitelist (or if there is even a whitelist set). The patch reverses this logic by first checking if the whitelist is empty (in which case all uploads are allowed even if of unknown type) and only then checks if there is a recognized type. |
Thanks for the PR. Hopefully it can be fast tracked. The ability to upload all file types is pretty fundamental. |
or at least have white listing work without mime lookup. (as a fall-back). |
[FIX] Allow unknown file types if no allowed whitelist has been set (#7074)
[FIX] Allow unknown file types if no allowed whitelist has been set (#7074)
- ファイルダウンロード時に余計な拡張子が付くことがあるのを修正 - アップロード時にjpeg以外は画像ファイル変換を行わないようにした - Travis CIの設定変更 - Dockerfileをこのリポジトリの設定に合わせた - [FIX] Allow unknown file types if no allowed whitelist has been set (RocketChat#7074)
- ファイルダウンロード時に余計な拡張子が付くことがあるのを修正 - アップロード時にjpeg以外は画像ファイル変換を行わないようにした - Travis CIの設定変更 - Dockerfileをこのリポジトリの設定に合わせた - [FIX] Allow unknown file types if no allowed whitelist has been set (RocketChat#7074)
So, is this bug really fixed? I have updated my rocket.chat server to 0.59.6 and I'm trying to upload a jmx file (jmeter test file), but I get the |
Yes it has been fixed @amateo. Check the comments earlier in the thread. The mime types are not pulled from your system but from a node package called mime-db. It has it's own database of mime types. If you want to allow mime types that mime-db does not know about, you have to allow all. |
- ファイルダウンロード時に余計な拡張子が付くことがあるのを修正 - アップロード時にjpeg以外は画像ファイル変換を行わないようにした - Travis CIの設定変更 - Dockerfileをこのリポジトリの設定に合わせた - [FIX] Allow unknown file types if no allowed whitelist has been set (RocketChat#7074)
- ファイルダウンロード時に余計な拡張子が付くことがあるのを修正 - アップロード時にjpeg以外は画像ファイル変換を行わないようにした - Travis CIの設定変更 - Dockerfileをこのリポジトリの設定に合わせた - [FIX] Allow unknown file types if no allowed whitelist has been set (RocketChat#7074)
- ファイルダウンロード時に余計な拡張子が付くことがあるのを修正 - アップロード時にjpeg以外は画像ファイル変換を行わないようにした - Travis CIの設定変更 - Dockerfileをこのリポジトリの設定に合わせた - [FIX] Allow unknown file types if no allowed whitelist has been set (RocketChat#7074)
Hi,
The content-type of outlook file is "application/vnd.ms-outlook".
But it didn't work after I added this MIME type in the admin/FileUpload.
In the "package.js" of Rocket.Chat-file-upload, I found that Rocket.Chat uses the node module-"mime-types".
Then I had tested it
And it returned "false".
How can I add the "application/vnd.ms-outlook" now in the Rocket.Chat if I don't want to allow to upload all type files? Or add the extension type in the "mime-types".
Thanks.
Rocket.Chat Version: 0.44.0
Running Instances: 6
DB Replicaset OpLog: -
Node Version: v4.6.0
The text was updated successfully, but these errors were encountered: