File upload - Bad request

Description

I keep getting “bad request” when uploading a file. I can’t find anything in the logs to help me understand this. The file is zip, which is allowed. I’m using the default GridFS for storage and uploads are enabled.

How can I diagnose and fix this?

Server Setup Information

  • Version of Rocket.Chat Server: 3.0.7
  • Operating System: Debian
  • Deployment Method: manual
  • Number of Running Instances: 1
  • DB Replicaset Oplog:
  • NodeJS Version:
  • MongoDB Version: 4.2.5
  • Proxy: nginx
  • Firewalls involved:

Any additional Information

I can see that a zip file is being rejected:
rooms.upload/:rid threw an error: Error: File type is not accepted.

So, the problem is that the default accept list isn’t working.

The default accept list includes:
application/zip,application/x-rar-compressed

But those are apparently inadequate. At least, when I tested, the types were reported as:
application/x-zip-compressed,application/octet-stream

for the respective types (zip, rar).