New issue
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
Check filename extension to determine file type #4474
Comments
|
- update some common types - add new common types - reorganize
We produce a mediatype based on the file extension in those cases where the browser doesn't doesn't send the correct mediatype. This mediatype is stored, and used to validate the mediatype on the server when we use a "Supported Files Types" validation. However, when using a "Supported Files Types" validation, we also output an With Chrome, Safari, and Firefox on Mac, at least, it seems that when the browser doesn't know the mediatype, it proposes all files in the file selector, which is good. This is the case with I was thinking that, if this was not the case with all browsers, we could also output an extension in the For now, I am not sure we need to do anything given the above. |
@ebruchez Is this new behavior documented? IMHO, this is also blog-worthy. (Should have a "blog-worthy" tag?) |
Just now documented. We have a list of possible blog posts in our recurring calendar entry. Not sure if a label is necessary? |
👍 for the doc; and no need for a tag if we have a list somewhere. |
We have #1838 about doing content sniffing, but that is a more elaborate fix to do.
Right now, we use the
Content-Type
header, which we know we cannot trust. Along the same lines, we know we cannot trust a file's extension. However, right now, if the browser doesn't provide a usefulContent-Type
, we don't check the extension either.So the idea would be, until we can do #1838, to use the file extension to determine the mediatype, either always, or when we don't get a useful
Content-Type
from the browser.+1 from customer
The text was updated successfully, but these errors were encountered: