Skip to content
Snippets Groups Projects
Commit 7303c99b authored by George Secrieru's avatar George Secrieru
Browse files

Avoid setting content-disposition header to images. Also deliver download...

Avoid setting content-disposition header to images. Also deliver download files with original file name.
parent a0eacea3
No related branches found
No related tags found
No related merge requests found
......@@ -39,7 +39,8 @@ if UploadFS?
onFinishUpload: ->
console.log arguments
onRead: (fileId, file, req, res) ->
res.setHeader 'content-disposition', 'download'
unless file?.type?.match(/^image\/.*/)
res.setHeader 'content-disposition', "attachment; filename='#{ file.name }'"
if Meteor.isServer
initFileStore()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment