Rocket.chat: Invalid file type in latest release?

Created on 23 Apr 2020  路  9Comments  路  Source: RocketChat/Rocket.Chat

When trying to upload archive .rar (and some others, sample .jpeg, .txt - work normally) I get an error message (attached screenshot), it is file type allowed (attached screenshot). And before there was a notification that showed exactly what type don't like (or don't have it in the allowed ones).

Server Setup Information:

  • Version of Rocket.Chat Server: 3.1.1
  • Operating System: Ubuntu 18.04
  • Deployment Method: tar
  • Number of Running Instances: 1
  • DB Replicaset Oplog: -
  • NodeJS Version: 12.16.2
  • MongoDB Version: 4.0.18

error_file_type_archive_rar
list_file_type

file sharing stale improvement

Most helpful comment

But "octet-stream" is not a good choise. Is there any way to fix this ?

right, application/octet-stream opens a wide range of files, but there is no other solution for this that you could do now. the technical reason behind this is that this information is provided by the client (either a web browser or an app).. we could try discover the mime type of a file by looking into his content, this will not cover all cases, but for sure will increase the number of known file types.

All 9 comments

you can try to check the mimetype on the commandline with the linux file tool. Maybe it reports application/vnd.rar and you have to add that too.

you can try to check the mimetype on the commandline with the linux file tool. Maybe it reports application/vnd.rar and you have to add that too.

Thank for answer, i tryed this.
Example:
file --mime-type STS.rar
STS.rar: application/x-rar

i set this mime-type to settings and uploading this file to messages, and i see same error.

@spanchy what Operating System and browser are you using? mime types can be different depending on combination of both. some times the browser doesn't recognise the file format and send as application/octet-stream, so you might need to add that as allowed file types (but bare in mind many other files might be recognised as application/octet-stream not only rar files)

@spanchy what Operating System and browser are you using? mime types can be different depending on combination of both. some times the browser doesn't recognise the file format and send as application/octet-stream, so you might need to add that as allowed file types (but bare in mind many other files might be recognised as application/octet-stream not only rar files)

Hello @sampaiodiego, thank for answer. I now tryed upload from Mac OS + official rocketchat app 2.17.7, from Windows 10 + chrome browser - and see same error.

thanks @spanchy for the info.. have you tried adding application/octet-stream to allowed files type list?

thanks @spanchy for the info.. have you tried adding application/octet-stream to allowed files type list?

Hey again, i set up this application. I have now this:
image/*,audio/*,video/*,application/octet-stream,application/zip,application/gzip,application/x-rar-compressed,application/xml,application/pdf,text/plain,application/vnd.ms-excel,application/msword,text/csv,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet

and test upload.. Congratulations, this is working! But "octet-stream" is not a good choise. Is there any way to fix this ?

But "octet-stream" is not a good choise. Is there any way to fix this ?

right, application/octet-stream opens a wide range of files, but there is no other solution for this that you could do now. the technical reason behind this is that this information is provided by the client (either a web browser or an app).. we could try discover the mime type of a file by looking into his content, this will not cover all cases, but for sure will increase the number of known file types.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

I have the same problem.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

marceloschmidt picture marceloschmidt  路  3Comments

Buzzele picture Buzzele  路  3Comments

lunitic picture lunitic  路  3Comments

Buzzele picture Buzzele  路  3Comments

djeber picture djeber  路  3Comments