Dropzone multiple images


#1

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


#2

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?


#3

Yes
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


#4

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


#5

I have thirty fields in record


#6

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


#7

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


#8

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


#9

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.


#10

Teodor.
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:
1
Is it possible to limit the number of images that can be loaded into dropzone?
2
By updating a record, is it possible to add new images and if necessary delete some of the previously saved ones from the server?
3
Is it possible to resize the images before uploading?
Thank you


#11

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.