export all my image URL with Item ID

i want to get all my E-commerce data image URL with item ID, so i can assign the URL to each product using CSV format. i want to export all my local image file URL with my own item ID.

The Problem:

  • i can bulk upload images on Wix

  • i can bulk upload products on Wix (csv)

  • i cannot link them together in bulk. You have to manually link each product to it’s image.

please help and give more details step by step. i am beginner. thanks

I need the same solution.

  1. Add the full file names to your csv file (make sure each file has a unique name).

  2. Import the csv to your collection.

  3. Create a webpage and add an upload button.

  4. Use code to upload multi-files.

  5. Once the files are loaded, query the collection for their original name.

  6. Update the URL.
    Something like:

import wixData from 'wix-data';
let fileData = [];
$w.onReady(() => {
  $w('#uploadAllBtn').onClick( () => {
    if($w('#uploadButton').value.length < 1) { return;}             
    $w('#uploadButton').uploadFiles()
    .then(files => {
      fileData = files;
      const fNames = files.map(f => f.originalFileName);
      return wixData.query('CollectionName').hasSome('fileName', fNames).limit(1000).find()
    })
    .then(r => {
      const {items} = r;
      if(!items.length){return Promise.reject('query failed');}
  	items.forEach(e => {
	  const file = fileData.find(f => f.originalFileName === e.fileName);
	  if(file){
		e.imageUrl  = file.fileUrl;
        }
      })
      return wixData.bulkUpdate('CollectionName', items);
    })
  .then(() => console.log('DONE'))
  .catch(err => console.error(err));
  });
})

Did anyone find a no-code solution? I need a list of URLs for all images within a Wix folder after they’ve been uploaded.

I’m not sure where to enter @J.D 's code and how to run it. Should I enable Developer Mode in Wix Editor, paste the code somewhere and publish the page?

Hello,

I also would like a solution regarding your last post …

“Did anyone find a no-code solution? I need a list of URLs for all images within a Wix folder after they’ve been uploaded.”

I am designing furniture E-com and architects sites and need to upload hundreds of photos via CSV file

Hey Wix, any updates on this? This person is exactly right. I can only add all my URL’s to my spreadsheet to import if I have a way of knowing what they are. Because you jack up my image names and create a false path, I can’t simply name each item after its SKU and then put in a logical file path like https://mysitename.com/media/sku.jpg. THUS I have to manually copy the URL for EVERY image one by one. This should not require fancy developer code. There should be a more logical solution for this. Help?