Dropzone multiple images


I am forced to respect the existing database of a old site
The insertion of the 30 photos of each record involves the saving in a single directory, but the name of the files in 30 different fields of the record
If I use a dropzone box, I could upload all 30 photos to save them in the same directory, but then can I somehow allocate the names in the different fields of the record?
Is it possible or not?
Thank you all


Hi Marazio, what exactly are you trying to achieve?
Do you need to upload multiple files and store them in different fields of the same row in the database, instead of storing them in different rows?


I have a table in the database that in each record has 30 photo fields
I should be able to use a dropzone box to load a part or all 30 photos (in a single directory) and assign photo names to photos for each field
I hope I explained the concept well


I don’t see anyway that would be possible. I think you would need thirty fields to be able to do that.


I have thirty fields in record


I meant you would need thirty form fields. I don’t think you can do it with one drop zone.


It’s true I think so too, but maybe it’s also a problem with 30 dropzone boxes.
I asked for have if possible some advice


@Marzio, no matter what solution you try to find, the the problem will always be the database design.

I think that it is time to correct that.


As others explained it’s not possible to store multiple filenames from one upload input to multiple fields in one row.
That’s a bad database design and you need to improve it - you need a new row per file.


As you have certainly understood, my problem is to maintain the correct visibility for all old records (with around 70,000 photos)
I knew it was impossible to use Dropzone that way, but I wanted to check if by chance there was some solution that I didn’t know.
So I think the only solution is to create 2 different detail pages, one for old records and one for new ones.
In this way I will be able to insert a single dropxone into the 29 photos intended for the product gallery
I would like to know if possible:
Is it possible to limit the number of images that can be loaded into dropzone?
By updating a record, is it possible to add new images and if necessary delete some of the previously saved ones from the server?
Is it possible to resize the images before uploading?
Thank you


Yes, you can use the form validator

Not with the dropzone with multiple file uploads. How would the update record know which of the files in the dropzone to update? You need a separate update record form per record.

Of course Marzio, check the documentation explaining how to upload, resize and insert image names in the database.