[whatwg] Input URL State and Files object

On Wed, 5 May 2010, Charles Pritchard wrote:
> On 5/5/2010 12:42 PM, Ian Hickson wrote:
> > On Wed, 5 May 2010, Charles Pritchard wrote:
> > >
> > > Awhile ago, it appears, the "files" object was removed from <input 
> > > type="url">
> >
> > "files" doesn't really make much sense for type=url... Do you mean 
> > type=file?
>
> Sorry, it didn't make much sense: I meant a FileList object which 
> FileReader would use.

I still don't really see what you want here.


> > > Is there currently a method for allowing cross-domain access to an 
> > > image based on user input?
> >
> > XMLHttpRequest is the intended way to do this.
>
> XMLHttpRequest relies upon CORS headers from the server

Yes. We would have to rely on CORS whatever the solution was to be.


> Should a user intentional drag an image or URL object, or otherwise 
> select one from their browser UI, the interaction is quite similar to 
> the <input type="file"> object. Only, with a remote resource.

Is this a common occurance?


> I'm sorry to have approached this so poorly; what I'm looking for is a 
> solution to the following use case:
> 
> A person is assembling a digital scrap-book, using a web application, of 
> pictures they've found related to their love of kittens. Those that 
> they've downloaded to their computer, they simply drag and drop into the 
> application -- (File API, FileReader, ondrop). Those that they find on 
> the internet, they drag their bookmark onto the application, drag the 
> image onto the application, or simply, copy and paste the URL into an 
> <input type="url"> box.

Oh, you mean the ability for the user to give the page access to remote 
resources that themselves aren't opting in to giving the page access.

Why wouldn't <input type=file> be usable for this? You should be able to 
drag any file to that, just like you can type in a URL in Windows in an 
open file dialog box.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Monday, 2 August 2010 18:54:28 UTC