Re: [XHR2] Blobs, names and FormData

2011/7/11 Anne van Kesteren <annevk@opera.com>:
> On Thu, 07 Jul 2011 03:00:55 +0200, Adrian Bateman <adrianba@microsoft.com>
> wrote:
>>
>> I was about to send a similar proposal. We'd prefer to add an optional
>> argument to append that specifies the filename. This is the smallest change
>> to
>> implementations and doesn't require developers to understand the
>> BlobBuilder in order to use FormData. Having to create another reference to
>> a Blob and probably deal with managing a File and Blob both pointing to the
>> same data seems
>> unnecessarily involved when all we want is to get the filename into the
>> FormData object.
>
> Isn't the smallest change just setting the file name to "blob" rather than
> the empty string? I suspect setting the filename might come up elsewhere too
> (e.g. file system API) so I'd rather not do it here.

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.

/ Jonas

Received on Monday, 11 July 2011 17:03:00 UTC