W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2012

File constructor

From: Bronislav Klučka <Bronislav.Klucka@bauglir.com>
Date: Fri, 11 May 2012 16:06:49 +0200
Message-ID: <4FAD1CF9.5020809@bauglir.com>
To: "public-webapps@w3.org" <public-webapps@w3.org>
currently File object cannot be constructed, only Blob can.
I'm currently implementing XHR blob upload, that blob can either be File 
(selected by user) or programatically created Blob.
On server side :
1/ In case of File, I get file name as part of the file metadata (name, 
size, type, etc)
2/ In case of Blob, I cannot specify name and I have to send it as 
additional parameter and ignore name metadata

sending multiple files/blobs at once can be a mess

is there a reason, while File cannot be created? It is Blob with has 
name and lastModifyDate .

Could there be File constructor, that would work as Blob constructor 
with 3rd parameter specifying the name of the file and lastModifiedDate 
set to creation date

Brona Klucka
Received on Friday, 11 May 2012 14:07:30 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:13:34 UTC