Save multifile inputs as list of images

We want to use the multifile input to save list of images. How can we do this?

1 Like

I’ve needed to do this too, but as far as I can tell, you can’t create multiple new things off a single action. My workaround has been to set a limit on that multi-upload, create a new thing for every item# and then delete any unused item# based off certain criteria not met. It’s pretty cumbersome, but I’m waiting for some kind of action that will allow for creation of multiple new things in this way - off the multi-upload.

2 Likes

@emmanuel Is there an easier way to do this?

We want to save a list of images (NOT files) inside one Thing. How can we do that?

1 Like

You can with the schedule API Workflow on a list, but even saving the multifile uploader files onto the user and trying to run that as the list … Bubble gives me an error that is sooooo unfair :slight_smile:

2 Likes

You don’t really need to save it as an image, if you save it as a list of files from the multi file uploader, you can then display the file as an image ?

The point is that we want to display them together with other images, and be able to run Imgix on them…

Hmm, unless you can somehow turn a file into an image field, that is going to be tricky.

See this post How to upload more than one image at a time

Maybe this helps?

Yes. you can create lists of files from the multi file input.

But if you then try to create a similar list of images from the file list… I can’t work that out. Have tried a few ways but to no avail.

The only way to do it seems to be the “one by one” method from above.

So you can set an image field to a file. But you can’t set a list of images to be a list of files. And not, it seems, can you set a list of files to be a list of files.

2 Likes

Hey again :slight_smile: I have a quick question if you have a sec…

Right now I have a Thing (listing) with a list of images. Users can upload up to 10 images using the multifile uploader.

I’m using your suggestion, saving each item independently but now am struggling to delete the images that are empty. Any suggestion on how to search and delete the empty images that are a part of the listings list of images?

Stuck here…

Thanks!

Hey @gpdmop ! So what you’re doing is a little different than what I had to craft together. Using your data, my equivalent was actually creating a new listing and saving file #x to a file field for every file uploaded, so a user would throw in 15 files and 15 listings would get created. It was just that particular scenario.

For your case though, can’t you just do “listing images add list multifileinput’s value”? All uploaded files should add to the single field since it’s a list field and the value of the uploader is a list of files.

Yeah so I was doing that, just uploading the images to the multi-file uploader but the images weren’t showing up when I was trying to access them (in a repeating group or carousal).

I read on the forum that people were having trouble retrieving a list of images uploaded in the multifile uploader.

GRR!

Hi @gpdmop @lonetour, don’t know if you’re still having trouble with your list of files. I just had the same problem with my first app but I’ve found a solution (little bit creepy but efficient), have a look :

Make a Workflow with one step for each file, step by step, one by one. (I’ve limited upload to 20 files/image, fairly enough I think).

Each step adds one of the listed files into the image list, here is the first step :
“[Your image list] add [index]'s Uploaded files:item #1’s URL”

Add a condition :
“Only when [index]'s uploaded files:count ≥ 1”

Following steps :
“[Your image list] add [index]'s Uploaded files:item #[current image step]'s URL”

  • condition “Only when [index]'s uploaded files:count ≥ [current image step]

Then duplicate this condition as many time as needed. Then just modify the [current image step] number. Your list of files is now a list of images, without any blank one :wink:

PS : Sorry for my poor english :blush: