Hello,
Let’s say I have two images, ‘1000’ and ‘2000’.
I’m am trying to find a way to upload both of those images, in a batch (because in reality there are 3500+ images), and associate them with a entry in a collection which has that image name as a value in one of the fields.
For example, let’s say I have two entries in my collection. Each entry has a unique value in a column called ‘id’. The first entry has an id of 1000, the second entry has an id of 2000.
I need to batch upload the images, and associate the image named ‘1000’ with the entry which has an id of ‘1000’, same for 2000.
Does anyone know how/if this can be done?
I don’t know about user uploaded images, but if you as admin can upload all the images to a collection then you can sort them out and associate them to their entry in another collection usign the information on the image field of the collection. when you upload an image it has an long id text where are the details and filename of the image. you can extract the filename from that id and use it to filter the other collection where it will be organized. the logic would be something like this:
collection 1(all the files uploaded)
collection 2( files with fields 1000 and 2000)
1- get an image from collection 1 with a query
2-extract the filename of the id of the image that looks like this: “wix:image://v1/2526bb_9eb5077fdb504a71890b3e89196afd94~mv2.jpg/ image1000.jpg #originWidth=000&originHeight=000”
the filename is in bold.
3-once you have the filename that contains the number you want you can make an conditional statement where you say:
if this filename contains or startswith 1000, go and insert it in the collection 2 in the field 1000. else go insert in collection 2 in field 2000.
the complicated could be getting the filename if there is not a order. but the sorting is easy.
well I hope this idea helps you. good luck.