RocketChat / RocketChat/Rocket.Chat

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

Open
#6,629 1 comment 1 reaction 1 assignee View on GitHub

@rodrigok is already working on this.

Since Apr 7, 2017.

feat: app settings type: bug
Dominant language
TypeScript
Stars
46.1k
Forks
13.9k
Avg merge
3d 3h
Merged PRs (30d)
130

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.