Data Relationship from "Assets" to "Products" - help please!

I have an app with a data type “Products” creating and tracking products.

I want a data type “Assets” where people can upload images and files.

SOME of these images and files should be related to “Products”, others will live on their own.

The “Assets” that should be related will have a Product ID in the filename or in a metadata field that matched their associated product’s field “Product ID”.

I built a similar app in another low-code platform and made a one Product to many Assets relationship and keyed it on the “Product ID.”

How can I structure this relationship best in Bubble?

What I hoped for is:

  • “Assets” (images and files) can be bulk imported as their own data type
  • Users viewing a “Product” page could see all “Assets” associated (my thought was either a metadata field or filename containing the Product ID field that patched a product).
  • Users viewing an Assets page could view all Assets, regardless of their association to a product
  • Users could update a status field on certain assets, marking them as approved, etc, kicking off more workflows
  • The goal is to make it easy for images to be uploaded, viewed, associated with products, and marked as approved/rejected

I think one of my big challenges is how to link things when they’re not being made via a form one at a time. But I really just don’t know and would love some advice!!!

There are really two components to your request. The first is the metadata association / relationships. This should be straightforward to setup using relationship mappings based on the product id or some other key as you have already described.

The tricky part on Bubble is handling files, particularly when you are dealing with them in bulk. We explored various solutions within Bubble but none of them fully satisfied our applications requirements (or they were too much trouble to be worth the implementation inside of Bubble).

However, it is possible to handle this logic strictly within Bubble if you are willing to invest a significant amount of time building out your own solution. The first place to start regardless of storing the files on Bubble or off platform is definitely this plugin:

The author @jonah.deleseleuc is very helpful and the plugin is highly useful for handling bulk uploads (For example using the plugin you can prefix the file name with the product id).

2 Likes

Thanks, I will look into the author and Uploader - appreciated!

May I ask what solution you ended up pursuing?
And did you end up using Bubble for the front end or just using a different product?

Thanks a lot for mentioning me and the kind words.

For anyone looking for the plugin, here’s a link:

1 Like

We stored the files on Azure using the blob storage and use Bubble for the front-end user interface.

1 Like

Thank you!

Btw, how useful do you think it would be if you could “give” the uploader files without having a user manually do it?

For instance, you get some files from an API or some server somewhere and then pass all those files at once to Better Uploader’s “Upload to Server” action. Would this be something people would want?

Jonah, I can’t think of a use case for it personally, but I’m sure someone out there might have one.

I absolutely think it would be useful.
I’d want to be able to query an AWS bucket of images from my app, either on a schedule or on command, and have the images flow into my app, but have the events that are in Better Uploader (like parsing for metadata, renaming, etc). That said, I’m new to bubble, not sure if that makes sense.

I can describe more, just lmk!

1 Like

I had a feeling. When you mentioned AWS, I thought this might be useful. Could you by any chance make an official request for this on the forum post bubble.trouble linked above?

Happy to, but I don’t see where he linked to a forum?
(again, new to the Bubble forum)

Here it is