W3C home > Mailing lists > Public > public-html@w3.org > July 2009

Re: Restricting maximum upload size

From: John Drinkwater <john@nextraweb.com>
Date: Sat, 11 Jul 2009 13:53:43 +0100
Message-ID: <4A588B57.2040905@nextraweb.com>
To: Alfonso Martínez de Lizarrondo <amla70@gmail.com>
CC: HTML WG <public-html@w3.org>
Alfonso Martínez de Lizarrondo wrote:
> I would like to propose adding a new attribute to <input type="file">,
> named (for example) maxsize, it should contain a number, the maximum
> size in bytes allowed by for each single file to be uploaded to the
> server. If it's missing, or it isn't a positive integer, it will
> default to 0, meaning that no file check will be done at the client
> side.

> Following on that, then comes the issue of <input type="file"
> multiple>, instead of adding another attribute to the input element, I
> think that it might be better to add it to the <form>, defining the
> total size that can be sent as the body of the POST to the server, if
> the sum of files and other text data it's over the maximum allowed
> size the form will fail the validation and won't be submitted.

Or the attribute maxsize would apply per file, so the total 
permitted would be maxsize × quantity of files selected. Would that 
fit better?

-- 
John ‘[Beta]’ Drinkwater        |      john@nextraweb.com
Received on Saturday, 11 July 2009 12:52:46 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 29 October 2015 10:15:48 UTC