On Wed, 29 Jun 2011 18:21:39 +0200, Alfonso Martínez de Lizarrondo <[email protected]> wrote:
If a png screenshot (as provided by current Chrome in the paste event) is
sent to the server and saved as "blob.bin" or "blob.blob", I doubt that it will be sent back to the client with the correct mime type and I don't know why the browser should try to sniff those contents instead of providing a
correct hint while uploading the data to the server.

I don't really know a realistic situation where a page can generate a Blob and don't know what kind of contents it has. It can be some text, some html, some picture, the new APIs will allow to create new types of contents that previously were out of scope for javascript, but in any of those situations the script will know what kind of data it's dealing with and what's the commonly expected extension for that content. So sending it in "the correct way" seems to me like a logical step, supporting the FormData is far more complex than just allowing to specify the filename so it would be a pity to forget about this missing bit.

Are you suggesting the browser should perform sniffing and decide the extension based on that? What rules should it follow?

http://tools.ietf.org/html/draft-ietf-websec-mime-sniff

I'm not sure dragging all that complexity here is a good idea.


--
Anne van Kesteren
http://annevankesteren.nl/

Reply via email to