Skip to content

Commit

Permalink
Fallback content-type as application/octet-stream for uploaded files (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
tassoevan authored and rodrigok committed Dec 27, 2018
1 parent 6151a89 commit 75f1c19
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/rocketchat-file-upload/server/config/GridFS.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ new FileUploadClass({

res.setHeader('Content-Disposition', `attachment; filename*=UTF-8''${ encodeURIComponent(file.name) }`);
res.setHeader('Last-Modified', file.uploadedAt.toUTCString());
res.setHeader('Content-Type', file.type);
res.setHeader('Content-Type', file.type || 'application/octet-stream');
res.setHeader('Content-Length', file.size);

return readFromGridFS(file.store, file._id, file, req, res);
Expand Down

0 comments on commit 75f1c19

Please sign in to comment.