Page 1 of 1

Upload multiple files via html input

Posted: Wed Jun 01, 2016 9:35 am
by vikkitwy
Hi! I need help about getting multiple files uploaded to the server. I am using HTML form for the upload.

E.g. upload.lc:

Code: Select all

...
<form enctype="multipart/form-data" action="uploaded.lc" method="POST">
Choose at least one file to upload: <input type="file" name="uploadedfile[]" multiple><br />
<input type="submit" value="Upload File" />
</form>
...
I tried to "print" the filename of the uploaded files, but they are showing empty.

uploaded.lc

Code: Select all

<?lc
put $_FILES['uploadedfile']['name'][0]
put $_FILES['uploadedfile']['name'][1]
?>
I'm not sure if I'm getting the idea right...

Re: Upload multiple files via html input

Posted: Wed Jun 08, 2016 5:10 pm
by MaxV

Re: Upload multiple files via html input

Posted: Wed Jun 15, 2016 9:24 am
by vikkitwy
Hi MaxV, thanks for the link. Yes I have read it as a reference and found that it only allows uploading one file at a time.

Re: Upload multiple files via html input

Posted: Wed Jun 15, 2016 12:38 pm
by FourthWorld
vikkitwy wrote:Hi MaxV, thanks for the link. Yes I have read it as a reference and found that it only allows uploading one file at a time.
Can you not upload them in sequence? Does your project specifically require concurrent uploads?