Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The uploaded file type is incorrect #19454

Open
noyome123 opened this issue Nov 4, 2020 · 7 comments
Open

The uploaded file type is incorrect #19454

noyome123 opened this issue Nov 4, 2020 · 7 comments

Comments

@noyome123
Copy link

Description:

The uploaded file type is incorrect

Steps to reproduce:

  1. Upload CSV file
  2. File type is "application/vnd.ms-excel" instead of "text/csv"

Expected behavior:

Actual behavior:

mongod_filetype

Server Setup Information:

  • Version of Rocket.Chat Server: 3.7.0
  • Operating System: Ubuntu20.4.1
  • Deployment Method:
  • Number of Running Instances: 1
  • DB Replicaset Oplog: Enabled
  • NodeJS Version: 12.14.0
  • MongoDB Version:4.0.20

Client Setup Information

  • Desktop App or Browser Version:Chrome 86 and desktop 3.0.6
  • Operating System:Windows 10

Additional context

Relevant logs:

no logs

@jadanah
Copy link

jadanah commented Nov 4, 2020

Can confirm I have the same issue but just haven't had the time to look into and report

@Benshi
Copy link

Benshi commented Nov 5, 2020

Most Windows 10 client may not have included HKEY_CLASSES_ROOT\MIME\Database\Content Type\text/csv on registry.
And if Excel was installed on it, the value of HKEY_CLASSES_ROOT\.csv\Content Type may have been registered as application/vnd.ms-excel .
Will the file type you upload change if you change these registry entries?

@noyome123
Copy link
Author

HKEY_CLASSES_ROOT\MIME\Database\Content Type\text/csv did not exist
HKEY_CLASSES_ROOT\.csv\Content Type is application/vnd.ms-excel

add text/csv,
and change ContentType to text/csv
but Changing the settings didn't fix it

As a test 1....

  1. add /var/www/aaaa.csv
  2. go to https://hogehoge/aaaa.csv
  3. aaa.csv has been downloaded

As a test 2 ....

  1. upload aaaa.csv to RocketChat
  2. download from RocketChat
  3. aaa.csv.xls has been downloaded

@sweetkandy
Copy link

Same with version 3.15.0. I wonder that no one really cares about this issue?

@WestXu
Copy link

WestXu commented Aug 4, 2021

Same issue here. Seems only affects csv files.

@Feijai
Copy link

Feijai commented Nov 2, 2021

app>api>server>lib>getUploadFormData.js
using node_module "Busboy" which not support csv file.

maybe that is the point

@norimakiHKS
Copy link

Hi.

This issue is now reproduced in my environment.
・Rocket Chat ver5.1.4

Anyone have a solution for this symptom?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants