MAX_FILE_SIZE (Uploading Multiple Files)
Posted: Tue Apr 13, 2004 4:50 pm
This is an example of a HTML form for uploading a file, similar to the one on php.net.
Now say I wanted to upload two files at once, but each with a different maximum file size setting, I will have something like this:
Notice there are now two hidden input elements with the same name (MAX_FILE_SIZE). Am I correct in saying that the second hidden input element would take precedence over the first and effectively make both inputs have the same maximum file size?
Apologies if that was explained badly
, but I would be very grateful if someone could find a way to have each input element with its own maximum file size setting.
Code: Select all
<form enctype="multipart/form-data" action="_URL_" method="post">
<input type="hidden" name="MAX_FILE_SIZE" value="30000" />
File 1: <input name="userfile" type="file" />
<input type="submit" value="Send" />
</form>Code: Select all
<form enctype="multipart/form-data" action="_URL_" method="post">
<input type="hidden" name="MAX_FILE_SIZE" value="30000" />
File 1: <input name="userfile1" type="file" />
<input type="hidden" name="MAX_FILE_SIZE" value="100000" />
File 2: <input name="userfile2" type="file" />
<input type="submit" value="Send" />
</form>Apologies if that was explained badly