W3C home > Mailing lists > Public > public-html-comments@w3.org > March 2010

Re: maxlength for file inputs?

From: Ian Hickson <ian@hixie.ch>
Date: Mon, 29 Mar 2010 20:21:52 +0000 (UTC)
To: "T.J. Crowder" <tj@crowdersoftware.com>
Cc: public-html-comments <public-html-comments@w3.org>
Message-ID: <Pine.LNX.4.64.1003292021140.4055@ps20323.dreamhostps.com>
On Mon, 29 Mar 2010, T.J. Crowder wrote:
>
> HTML5 does many things to provide hints to UAs that help the UA validate
> form input (such as the
> accept<http://www.w3.org/TR/html5/forms.html#attr-input-accept>attribute).
> Have you already considered allowing
> maxlength <http://www.w3.org/TR/html5/forms.html#attr-fe-maxlength> to give
> a maximum file size hint for file inputs? (I can't imagine this is a new
> suggestion, but I also can't immediately see what it would have been
> considered and rejected as the attribute has no other meaning for a file
> upload, but it's not mentioned in the spec...)

We actually had this a few years ago, but it ended up being dropped for 
various reasons. You can now do it in JS, though, using the File API to 
check the file size, if you really need to do this.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Monday, 29 March 2010 20:22:21 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 1 June 2011 00:14:01 GMT