Skip to content
This repository has been archived by the owner on Feb 27, 2020. It is now read-only.

Use mime sniffing to detect mimetype, fallback to file extension #252

Open
jonasfj opened this issue Apr 25, 2017 · 2 comments
Open

Use mime sniffing to detect mimetype, fallback to file extension #252

jonasfj opened this issue Apr 25, 2017 · 2 comments

Comments

@jonasfj
Copy link
Contributor

jonasfj commented Apr 25, 2017

We currently detect mimetype based on file extension... I propose that:

  1. task.payload.artifact should have an optional contentType property
  2. We should follow the mimesniff spec to detect mimetype, falling back to file-extension if that doesn't work.

Note:

Hence, minesniff is already implemented for us :)

@jonasfj
Copy link
Contributor Author

jonasfj commented Apr 25, 2017

So dustin made a good point that looking at contents might not be smart since it's less predictable..

@petemoore
Copy link
Member

++ for adding optional artifact field - actually I was thinking the same thing, and never got round to documenting my suggestion!

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

No branches or pull requests

2 participants