We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
https://pkg.go.dev/net/http#DetectContentType
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:95.0) Gecko/20100101 Firefox/95.0
I used http.DetectContentType with this uploaded TIFF file (unzip it to test):
Document numérisé.tif.zip
buff, err := file.Open() head := make([]byte, 512) _, err = buff.Read(head) contentType = http.DetectContentType(head)
image/tiff
application/octet-stream (the MIME type of this file isn't recognized)
Could you add this MIME type to http.DetectContentType?
The text was updated successfully, but these errors were encountered:
As documented, DetectContentType follows https://mimesniff.spec.whatwg.org/, which does not define a TIFF signature.
DetectContentType
Sorry, something went wrong.
No branches or pull requests
What is the URL of the page with the issue?
https://pkg.go.dev/net/http#DetectContentType
What is your user agent?
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:95.0) Gecko/20100101 Firefox/95.0
What did you do?
I used http.DetectContentType with this uploaded TIFF file (unzip it to test):
Document numérisé.tif.zip
What did you expect to see?
image/tiff
What did you see instead?
application/octet-stream (the MIME type of this file isn't recognized)
Could you add this MIME type to http.DetectContentType?
The text was updated successfully, but these errors were encountered: