Saving images in some kind of array

Dear all,

just found out about Bubble and it is amazing how fast and intuitive you can start building a prototype.
Thanks for that!
I am currently stuck in a way that I would like to bundle photos taken with the phones camera into some kind of an event.
My problem is I cannot see which Data Type I need to take.

What I did so far:
Create a new Data Type called “Gallery”
Add a new Field name “gallery”
Add Field type “image”
checked "This field is a list (multiple entries)

So far so good…but from there on I need to manually add each image (say three fixed images).
This is not really flexible or dynamic…I am more thinking of something like an array data type where I can add and reference as many photos I want …

What I am aiming at is to show a list of “Events”…for each event the user should be able to add pictures (as many as they want)…So there is a Data Type called “Event” which contains above mentioned Data Type “Gallery” with a list of photos.

Thanks for your help
Carsten

I am a little confused as to your problem, as we have the " array data type" concept in bubble, that is a “list of images” that you can “add” to by using the photo uploader and a workflow.

So it should be perfectly possible ?

Make a table that just holds pictures. Something like this:
Table: picture
Field: image
Field: name
Field: event

Then use a search to find the user’s pictures.

Thanks to both of you for your help.Managed to save the uploaded files in a list of images just as you mentioned @NigelG
However now I am facing issues when trying to delete on of the images in that list (similar to the problem described in (Delete Image in List of Images) so if I understand correctly it would be cleaner to structure it as you mentioned @blueback09

Will give that a try now…but how can I add multiple (potentially unlimited) amount of pictures per event without again use a “List of images” just now within the “Event_Pictures” table?

I am trying the following
Instead of trying as before like

Events

| info 1   |  info 2  |      gallery     |
---------------------------------------------
  <text>      <text>     <list_of_images>

I am now trying something like this

Events

unique id	| info 1   |  info 2  |      
-----------------------------------------
ABC	          <text>      <text>     
DEF	          <text>      <text>     

Events_Gallery

events unique id	|  picture |      
-----------------------------------------
ABC	                <image1> 
ABC	                <image2>
ABC	                <image3>
DEF	                <image1> 
DEF	                <image2> 

But I can’t figure out how to save the uploaded images into “Events_Gallery” witht the unique_id of “Event”

You don’t need to worry about unique_ids in that way (if you are generating your own, or using them to link tables).

Event will have a List of Event Galleries (so data type Event Gallery)
Event Gallery will have a field of Event (so data type Event)

So in your workflow you create your Event Gallery using the Event that you are working with
Then in your next step your “Make Changes to a Thing” for Event and add the Event Gallery you created in the previous Step to the Event Gallery List on Event.

You don’t HAVE to do this two way link, but it makes it easier to display stuff without a search (so you can do Event’s Event Gallery List : count) to count the images for example.

I have something similar here … Question has lots of Answers, and Answer contains an Image.

That is exactly what I did after your comment and it works fine!
Thanks @NigelG !!

This topic was automatically closed after 70 days. New replies are no longer allowed.