[whatwg] Wish: Restrict Image Size on Upload

what at keepthebyte.ch what at keepthebyte.ch
Mon Dec 27 15:41:27 PST 2004


> On Mon, 27 Dec 2004 what at keepthebyte.ch wrote:
> >
> > It would be useful to be able to define a bounding box of allowed 
> > picture width and height when uploading picture(s). The UA would need to 
> > check if the selected picture(s) is/are inside the allowed range (min - 
> > max width & height). With picture I generally mean the internet 
> > widespread formats (png, gif, jpg).
> 
> With the coming of high-resolution monitors, the pixel size of the image 
> will presumably become less important, as monitors will be getting more 
> pixels per centimeter.
> 
> Web Forms 2 does provide a way to limit the file size, however, which is 
> presumably more important.
> 

Can't comment on the "pixel" discussion.

Right - the UA-based limitation of file size, mime type and file count
are undoubted important improvements. Being able to restrict the picture
dimension before the file is getting send to the server would be nice.
We might someday get an OS/UA that is able to only list the pictures in
the valid size to select - or provide an "automatic resize to fit upload
guideline" function . (I’m using Java applets today - would be nice to
get ride of them in the WF2 generation browsers).

Example tag... (just an idea)

<input type="file" name="avatar" accept="image/*" maxlength="81920"
dimension="256,256,32,32" />

Keep the byte.

Cedric



More information about the whatwg mailing list