Re: new form control

On Fri, 20 Apr 2007 12:08:36 +0100, Dmitry Turin <html60@narod.ru> wrote:

> When you fill server by pictures from browser, it will be reasonable,
> that browser will display content of graphic file (attached to form)
> instead of path and filename.

I think it doesn't even need another element—nothing stops UAs from  
displaying:

<input type=file accept="image/*" style="width:300px; height:300px" />

just like you want.


But improvement in uploads would be very welcome. I'd like ability to  
automatically (and asynchronously) upload images dragged and dropped onto  
WYSIWYG editor (or any designated element). That would allow seamless  
integration of CMSes with local files. One coluld change his forum avatar  
just by dropping new image onto it, etc.

Markup for that can be quite simple:

<input type=file id=uploader>
...
<div dropped-files=uploader>drop here!</div>

When file is dropped onto document, browser would:
1. find first ancesetor with dropped-files attribute,
2. set value of <input> designated by this attribute,
3. fire filedropped event (so a script could gather additional  
information, e.g. where exactly the file was dropped)
4. submit input's form (asynchronously?)

-- 
regards, Kornel Lesinski

Received on Friday, 20 April 2007 20:19:37 UTC