Create A Dynamic Gallery from Google Drive NOT WORKING

I am creating a website for a car club. Each car has a unique dash number. I have a database about the owner, model, etc, history of each car. I also will create an additional database of photoes for each car. I have over 8000 pictures that I need to load into a database in order to create a “dynamic gallery page” based on the dash number of the car. Each car could have as few a 4 or 5 pictures, while others could have 25 or more.

I have already looked at tutorials on creating a dynamic phtoto gallery and understand how to accomplish this. Also, I understand the reference page method needed to make this work.

I have followed directions below and it is not working at all.

Thanks
JD

Hay JD,

Uploading many images is always complex. The best I can offer is to upload all the images to a web drive like dropbox or google drive, on a shared drive (a drive that anyone can access).

Then, prepare a CSV file with the URLs to the images and car id and upload this CSV into a collection. If all goes right, you should see the images in the database view in wix code.

I did find a solution to get all the links… google drive

https://chrome.google.com/webstore/detail/extract-drive-links/klonacpfbangpegffkdopiilfdhgjhgo?hl=en

I still need to know if I need to do links individually, or will the folder link grab all the pics inside?

Thanks

Use this plugin to create a CSV that you can then upload to a collection in wix code. In this CSV, have a field that identifies which image belongs to which car and color. If you can extract this information from the image name, thats the best option. If not, it will be manual to some degree.

Once you have a collection, lets say that looks something like -

Ford Escort, red, url…
Hunda CRV, blue, url…
Upload the data, and you should see all the images in the database.

OK, I have a database with the dash_no of the car, and the URL. The photos are on GoogleDrive.
I created a dynamic gallery page and connected the page to the database. Then on the Add Images line, when I click on the Database Icon, the popup shows the right Dataset is connected, but when I click Image Sources Connect to" I see the database fields, but they area ll greyed out. Same thing with Title Connects to. I was able to change Links Connect to, to Database URL, but no images show up when I save and publish. And YES the Google Drive Folder containing these images is Shared to Anyone with Links.

URL to site: https://jds-cvoa.wixsite.com/cvoa/cv-registry

Click on View Photo Registry Link… No Images appear.

Hello JD,

The reason you are probably not getting any images to appear is because the google drive links are not in the correct format that the database reads the URL. The URL has to end in .png or .jpeg

Go to your live database and test this out.

This is my test image:


This is the link to this same image on Google Drive: https://drive.google.com/file/d/1aFjdVVfXyNTTlNNlsCR67sXF4Zj7KNYq/view?usp=sharing
Link to this same image on TinyPic (free image hosting website): http://i64.tinypic.com/16gh6r4.png

When you paste the link that does not end in .png it will give you an error in your database, therefore it will not read it …


So your solution is to find a free image hosting site to upload all your images ---- preferably one with bulk upload but that can still give you the individual URL for each image. (Label them to help you with SEO.). Or you can upload them into your wix media folder (which is what I think you were trying to avoid ---- if not — this is a solution you may want to think about). Either way … they will take a long time to be uploaded … and you will need the individual URL for each and every picture regardless unless you want to upload one by one through and upload button connected to your database.

Then after you have a valid URL for each picture make a spreadsheet, convert to CSV, then upload CSV into your database.

Thanks Nayeli,

Now I understand, that makes perfect sense. Note. The photos are on a Linux server and I have already created a shell script that will load all 8500 file at night automatically. Didn’t I see a way to create a Google Drive or Dropbox account in Wix?

Thanks Very Much. I will be in touch!

There’s another possible way to achieve this:
There’s a multiple file upload feature into a gallery.
So you can create a regular gallery, upload a big batch of images to it, and then use code to iterate through all the images and insert them into a collection.
Like this:

export function gallery1_click(event, $w) {
 let g = $w('#gallery1');
 let insertObj; let count = 1;
 g.items.forEach(function(i){
 insertObj = { 'title':count++, 'src':i.src };
 wixData.insert('Images', insertObj);
 });
}

note: you can’t iterate the images of a pro gallery, so use a regular gallery for this

OK. I have re-created a Repeater page to display 1) a car, vehicle info, who its registered to, and a thumbnail image linked to 2) the photo-database containing the URLS to an off-site storage facility. The car info comes from the CVOA-Registry database, while the photos come from the CVOA-Photo-Registry database. The common link (reference field) is the “dash-no” of the car. While it “appears to be working”, when I click on the image, it properly brings up the Photo Gallery for that car and starts the slide show. BUT, it should STOP when all the images for that dash-no have displayed… it keeps going into the photos for the next car in the registry.

Also, even though I have 3 cars in my test database, the 1st repeater page is ONLY showing the first car.

URL for the site is: https://jds-cvoa.wixsite.com/cvoa

Any help is greatly appreciated.
Thanks
JD

OK Folks, it’s been a week and I still do not have this working as it should. I have tried TWO ways to get this to work, 1) using a Table and 2) using a Repeater. There are 3 databases at play here:

  1. Members who own one or more car
  2. A registry of the Car, each car has a unique dash number, the registry contains all the details about the car, dash number, vin number, owner email address, color, engine, miles, options, previous owners…etc.etc. 39 fields.
  3. A third database is a Dynamic Photo gallery to grab photos from Cloudinary. Some cars may have only a few photos while others may have 50 or more.

The main page: Review-Search-Registry ( Once I get it working plan on adding search) right now it is ONLY display.

Functionality: The View Registry page should get the 1st car from the Registry database (sorted by dash#), and present the dash# , Vin#, and color, on the Repeater, then based on the email in the registry look up the owners name, city and state from the Membership database and display that on the Repeater. Then based on the dash# in the Registry, lookup and display the and thumbnail image URL from the “Photo Registry” and make it a link to a Dynamic Photo Gallery that will display images listed for that car by Dash-No. The images are stored on cloudinary.com.

If I PREVIEW the page View-Search-Registry, it displays the 3 cars I have stored in the database, BUT Only the First entry is correct. The second and third entry SHOWS the owner information from the first entry. Somewhere along the way, I broke the ability to link to the photo_image-URL in the CV-Photo-Registry. Earlier in the week, this was working, but the dynamic page show all the photos for dash# 001 but kept on going showing all 9 images???

I logged a ticket with Wix support who suggested not using repeaters but using a Table. I followed his instructions and created View-Search-Registry-Test. It is not working at all the page launches and displays “Loading…” FOREVER, like maybe its in a loop? There ARE 1400 entries in the Members Db but I only populated the Registry with 3 cars and populated the Photo-Registry with 3 photos per car…total of 9 photos(URL Links). I called into support and was told this this is Wix Code and they could not help me. Duh! there is not a singlle line of wix code in any of this! Its ‘out of box’ use of reference fields.

Ironically, I built this very site 18 years ago using IBM Informix database and ESQL-C programming language. The site is running in-house on am IBM-Think Server on Oracle Linux. But it is old, dated, and needs to be moved to a modern environment.

Any help is greatly appreciated.

I finally figured it out, kinda… The items that were not filled on the repeater would come from the Members DB, and in a normal relational database the common field between the members database and the registry database (email). At run time the SQL would connect to the Members DB and retrieve the info.
I found out that for those fields, if I DIsconnected from Members DB and Connected to the Registry DB and scroll all the way to the bottom After the Registry fields are shown, it shows the [email] fieldnames from the Membershp DB. Again, my previous experience in traditional relational databases got in the way!