Rocket.Chat icon indicating copy to clipboard operation
Rocket.Chat copied to clipboard

Unable to upload gzip file with "Accepted Media Types" defined

Open kristjankullerkann opened this issue 9 years ago • 1 comments

We have defined "Accepted Media Types" setting as image/*,audio/*,application/*,video/*,text/*

When tring to upload a .gz file (or tgz, tar.gz) the upload fails silently (no apparent error from application).

From browser console we can see:

aee4ed2….js?meteor_js_resource=true:238 Uncaught TypeError: Cannot read property 'replace' of undefined
    at Object.F.fileUploadIsValidContentType (aee4ed2….js?meteor_js_resource=true:238)
    at aee4ed2….js?meteor_js_resource=true:258
    at FileReader.o.onload (aee4ed2….js?meteor_js_resource=true:258)

It seems as there is some issue with mime-type application/x-gzip?

We can upload gz file if we change "Accepted Media Types" to * or leave it empty.

Rocket.Chat Version: 0.54.2 Running Instances: 1 DB Replicaset OpLog: Node Version: 4.7.1

kristjankullerkann avatar Apr 07 '17 12:04 kristjankullerkann

I am having the same problem with the latest version of rocketchat, with the file upload upload option left blank. It only happens with .gz file format.

oliver-bowman avatar May 16 '17 14:05 oliver-bowman