[whatwg] Wish: Restrict Image Size on Upload

Matthew Thomas mpt at myrealbox.com
Mon Dec 27 17:46:08 PST 2004


On 27 Dec, 2004, at 11:08 PM, Ian Hickson wrote:
>
> 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.
> ...

As others have said, this is not a very compelling reason to reject the 
request. What bothers me more is why it should be a UA's job to 
restrict uploads based on pixel size of images, and not on other 
things.

Should UAs be able to restrict uploads based on the bit depth of 
images? (For some purposes only 1-bit images are desired.) How about 
based on whether images are animated or not? (Some forums may want 
avatars to be non-animated only.) How about based on the number of 
pages in a PDF or RTF document? (Job application forms may want resumés 
to be no more than /n/ pages.) How about based on the sample rate of 
audio files? Or on the framerate of video files? At what point do you 
say "okay, that's the server's job, not the client's", and why?

(Keep in mind that any restriction done by the client will still have 
to be done by the server as well, to guard against buggy or malicious 
UAs.)

-- 
Matthew Thomas
http://mpt.net.nz/



More information about the whatwg mailing list