Description
While trying to upload a .zip file in chat, I am getting the error as below:
File type is not accepted. [error-invalid-file-type]
I have already allowed the below file type extensions :
Accepted Media Types:
image/,audio/,video/*,application/zip,application/x-rar-compressed,application/pdf,text/plain,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.oasis.opendocument.text,application/vnd.oasis.opendocument.spreadsheet,application/vnd.oasis.opendocument.presentation,text/csv,application/ms-powerpoint,application/ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel,application/octet-stream,application/x-compressed-zip,application/x-gzip
Server Setup Information
- Version of Rocket.Chat Server: 3.2.0
- Operating System: CentOS Linux release 7.7.1908 (Core)
- Deployment Method: tar
- Number of Running Instances: 2
- DB Replicaset Oplog: Enabled
- NodeJS Version: v12.14.0
- MongoDB Version: 4.2.5-5
- Proxy: nginx
- Firewalls involved: yes
Any additional Information
Server Logs:
I20200510-14:47:06.084(0) API ➔ debug POST: /api/v1/rooms.upload/2MGXTqu7m8Yp2aCp
I20200510-14:47:06.087(0) Meteor ➔ method canAccessRoom -> userId: 82LFQt237B6, arguments: [“6E2MGXTqu7m8Yp2aCp”,“2LFQt237B6”]
I20200510-14:47:06.183(0) API ➔ debug post rooms.upload/:rid threw an error: Error: File type is not accepted. [error-invalid-file-type] at Filter.validateFileUpload [as onCheck] (app/file-upload/server/lib/FileUpload.js:93:10) at Filter.check (packages/jalik:ufs/ufs-filter.js:108:53) at FileUploadClass.insert (app/file-upload/server/lib/FileUpload.js:538:11) at FileUploadClass.insertSync (packages/meteor.js:306:21) at DDPCommon.MethodInvocation. (app/api/server/v1/rooms.js:122:35) at packages/dispatch_run-as-user.js:211:14 at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1234:12) at Object.Meteor.runAsUser (packages/dispatch_run-as-user.js:210:33) at Object.post (app/api/server/v1/rooms.js:120:27) at app/api/server/api.js:368:82 at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1234:12) at Object._internalRouteActionHandler [as action] (app/api/server/api.js:368:39) at Route.share.Route.Route._callEndpoint (packages/nimble_restivus/lib/route.coffee:150:32) at packages/nimble_restivus/lib/route.coffee:59:33 at packages/simple_json-routes.js:98:9
I20200510-14:47:06.184(0) API ➔ debug Failure { statusCode: 400, body: { success: false, error: ‘File type is not accepted. [error-invalid-file-type]’, stack: undefined, errorType: ‘error-invalid-file-type’ } }