W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2011

Re: [XHR2] Blobs, names and FormData

From: Jonas Sicking <jonas@sicking.cc>
Date: Mon, 11 Jul 2011 10:53:27 -0700
Message-ID: <CA+c2ei8A3E0T0uFXckKvjstJmRj_f5CD9SbQJ4273-t5Zy7bjg@mail.gmail.com>
To: Adrian Bateman <adrianba@microsoft.com>
Cc: Anne van Kesteren <annevk@opera.com>, Julian Reschke <julian.reschke@gmx.de>, Alfonso Martínez de Lizarrondo <amla70@gmail.com>, Webapps WG <public-webapps@w3.org>
On Mon, Jul 11, 2011 at 10:12 AM, Adrian Bateman <adrianba@microsoft.com> wrote:
> On 11 July 2011 10:02, Jonas Sicking wrote:
>> Additionally, what is the use case of being able to set the filename
>> during a FormData submission? My perception was that the main use case
>> was to not get an empty filename as many serverside implementations of
>> multipart/form-data did not deal well with that. I so far have not
>> heard a reason to believe that having the ability to specify a precise
>> filename is a common use case, so it seems unnecessary to add syntax
>> sugar for that.
> Some content management systems use the original filename by default when storing files in document libraries. It's certainly a lesser use case but seems like a relatively trivial change to the API. I don't see it as sugar, since it's not possible to achieve this on the client in any other way.

I've proposed adding the following function to BlobBuilder:

interface BlobBuilder {
  File getFile(in DOMString name, [optional] in DOMString contentType)

This will let you accomplish the same thing in just 2 additional lines
of javascript (one of which can be reused).

/ Jonas
Received on Monday, 11 July 2011 17:54:24 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:26:33 UTC