News for hackers. Stuff that matters.
Re:Should HTML have a “max file size” attribute for input ty... by koichirose on Friday June 19, 2015 @12:54PM (#9746083)
I guess this wouldn't replace proper server side validation anyway, but it would be a nice addition.
Re:Should HTML have a “max file size” attribute for input ty... by gkoberger on Friday June 19, 2015 @01:48PM (#9746465)
None of HTML's new form attributes replace server side validation (which is annoying since you end up repeating code and having slight differences), however it's a good start.

With CORS and CSRF tokens, it would cut down on accidental issues – which for most sites is a bigger deal than malicious activity.

Re:Should HTML have a “max file size” attribute for input ty... by duskwuff on Friday June 19, 2015 @01:53PM (#9746494)
In that sense, it'd be a perfect analogue to the "maxlength" attribute on text inputs. (In fact, I wonder if it'd be sufficient to just make that attribute apply to file inputs as well...)
Re:Should HTML have a “max file size” attribute for input ty... by edent on Friday June 19, 2015 @01:09PM (#9746185)
Yeah, exactly. It just prevents people from uploading ridiculously large files which have no hope of completing.
Re:Should HTML have a “max file size” attribute for input ty... by BinaryIdiot on Friday June 19, 2015 @02:03PM (#9746546)
Well you can check file sizes in JavaScript before upload so you can do this already.
Re:Should HTML have a “max file size” attribute for input ty... by acveilleux on Friday June 19, 2015 @01:46PM (#9746446)
Yep, browsers could serve up a warning instantly.