Skip to content
This repository was archived by the owner on May 22, 2021. It is now read-only.

Set a default MIME type in metadata? #620

Closed
ehuggett opened this issue Oct 27, 2017 · 2 comments · Fixed by #624
Closed

Set a default MIME type in metadata? #620

ehuggett opened this issue Oct 27, 2017 · 2 comments · Fixed by #624

Comments

@ehuggett
Copy link
Contributor

I'm not aware of any problems this is causing (noticed by chance), but if I upload a file that does not have an extension then the "type" field in the (encrypted) metadata is empty.

Server version: 5211339
Browser: Firefox 52.4.0 (64-bit) on Debian

send/app/fileSender.js

Lines 195 to 197 in 5211339

iv: arrayToB64(this.iv),
name: this.file.name,
type: this.file.type

I added || 'application/octet-stream' to L197 in ehuggett@58555a6, and when uploading files with names that do not have an extension this "default" MIME type was used instead

@johngruen
Copy link
Contributor

@g-k do you have any thoughts on this? Would adding a default type cause any problems here?

@g-k
Copy link

g-k commented Oct 30, 2017

@johngruen I can't think of any problems this would cause. Apache and Nginx default to application/octet-stream so that's a good choice.

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

Successfully merging a pull request may close this issue.

3 participants