ID of Multiple uploads

See all posts Reply

ID of Multiple uploads new!
by RunarJoh, 11 years, 11 months ago
Hi
I just downloaded the class.upload and wanted to know if there is a way get the id of multiple uploads.
Im trying to upload many images and want to set id for each image and give each image a new name witch is the id:
LIKE THIS:
<form id="uploadForm" name="uploadForm" method="post" action="upload.php" enctype="multipart/form-data">
<input type="hidden" name="action" value="multiple" />
<input type="file" size="32" id="id-12-41" name="my_field[]" value="" />
<input type="file" size="32" id="id-11-61" name="my_field[]" value="" />
<input type="file" size="32" id="id-2-61" name="my_field[]" value="" />
<input type="submit" name="submit" value="Upload" class="buttonUpload"/>
</form>

So when upload.php builds the array I would also like to have the id!Reply
Re: ID of Multiple uploads new!
by colin, 11 years, 11 months ago
No, it is not possible, as when you submit the form to PHP, the ID is not passed along.Reply
Re: ID of Multiple uploads new!
by RunarJoh, 11 years, 11 months ago
Thanks for quick response. I'm still new at uploading files process so didn know that id would not be passed along.
My solution to this was that I already keep that id's in session array so it was easy for me to get the ids from there and append new name to the images in the foreach loop for the process.
Looking forward to working with this class. thanks again for this great work you have done.Reply