On 7/11/2011 10:02 AM, Jonas Sicking wrote:
2011/7/11 Anne van Kesteren<[email protected]>:
On Thu, 07 Jul 2011 03:00:55 +0200, Adrian Bateman<[email protected]>
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.
In document uploading; many doc management sites
retain information about the original filename that has been uploaded and
may use that filename as the default name of the uploaded file.