Upload multiple files via html input

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
vikkitwy
Posts: 2
Joined: Wed Jun 01, 2016 9:10 am

Upload multiple files via html input

Post by vikkitwy » Wed Jun 01, 2016 9:35 am

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...

MaxV
Posts: 1580
Joined: Tue May 28, 2013 2:20 pm
Contact:

Re: Upload multiple files via html input

Post by MaxV » Wed Jun 08, 2016 5:10 pm

Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w

vikkitwy
Posts: 2
Joined: Wed Jun 01, 2016 9:10 am

Re: Upload multiple files via html input

Post by vikkitwy » Wed Jun 15, 2016 9:24 am

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.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10052
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Upload multiple files via html input

Post by FourthWorld » Wed Jun 15, 2016 12:38 pm

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?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Post Reply