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

Re: Fwd: File Upload Status ?

From: Jonas Sicking <jonas@sicking.cc>
Date: Fri, 08 Aug 2008 14:28:56 -0700
Message-ID: <489CBA98.5070209@sicking.cc>
To: Garrett Smith <dhtmlkitchen@gmail.com>
Cc: Web Applications Working Group WG <public-webapps@w3.org>

Garrett Smith wrote:
 > Firefox 3:
 >   File
 >     fileName
 >     fileSize
 >     getAsBinary()
 >     getAsDataURL()
 >     getAsText()
 > Working Draft:
 >   File
 >     readonly attribute DOMString      fileName;


 >     readonly attribute DOMString      mediaType;

Sounds like your usecase is a good one, please file a bug to get this 
implemented in firefox.

 >     readonly attribute unsigned long  fileSize;


 >     DOMString          getDataAsString()
 >                                         raises(FileException);

same as getAsText

 >     DOMString          getDataAsBase64()
 >                                         raises(FileException);

What is the usecase for this? Seems like getAsDataURL is what you 
usually want.

 >     DOMString          getDataAsHexBinary()

What is the use for this? Seems like getAsBinary is a better solution 
for accessing the raw data.

 > (regarding FileDialog)
 >> I'm not sure if this is a super desirable feature from a security 
point of
 >> view. Technically speaking a site could take a users browser hostage 
 >> the user agrees to give up a sensitive file:
 > Thanks for pointing that out. That's pretty nasty. It's a good case
 > for removing FileDialog. What is the use case for FileDialog that
 > can't be fulfilled by the browse button?

Not depending on HTML i suspect. But that's a guess.

In general I definitely support having the File object specified. Not 
sure how big of a fan I am of the other parts of the current spec 
though. But I don't have very strong feelings either way as of yet.

/ Jonas
Received on Friday, 8 August 2008 21:30:33 UTC

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