Forum Academy Marketplace Showcase Pricing Features

Multi File Upload

Overall Goal:

  • User canbatch upload n files. <=20 is fine.
  • On an index page, user can see a list of all of the items they have uploaded.
  • User can click on any item in an index page to see a details page for each item.

Data Structure

  • User Table with a List of Files data field
  • File Table

Hello,

I am creating a page that allows users to drag and drop a number of files with the multi upload tool:

  1. I am having a hard time saving each of the files that are being uploaded. My app is currently only saving the very first one. I looked at https://bubble.io/page?type=page&name=multiimage_upload&id=forum_app2&tab=tabs-1, but following the same logic on my app, it would create a strange duplicity problem. We have a specific page that is a details page that should show the details of each item. Looking at the overall goals from above, how would you structure this?
  2. Using the same multi-select tool in 1 above, is there any workflow that extracts the file name from the files?
  3. Is there a way to send an email for each file that is being bulk uploaded? Meaning, once a user uploads n (<=20) files) and click an execute button, a email goes out for each of the files that were just uploaded?

Thanks,
John

Hello,

We can’t have mass emailing yet (for some technical reasons).

Can you open your own app so that users can see what you did (regarding 1)?

Sure. How do I open the app up?

Ok, I made it public and I gave users the right to edit it.

Without a link it’s a bit hard to see what is going on.

Yep. Sorry. I am new at this stuff.

I don’t have a developer background.

https://bubble.io/site/feed-fuddy/version-test/

Actually this link is the best one to share

Your confusion here is that the file uploader returns a list of files, a file here being a built-in type, and not the one you’ve defined. So if you make a field on the user be ‘files’ and of type ‘list of files’ (but not the type you’ve defined), you’ll be able to do

when the user clicks on execute, make change to the current user and change the field ‘files’ and make it equal to the multifile input value (and send send emails, etc.).

Giving it a shot. Still having difficulty.

I had this as my database before. I think that it matches what you suggest.

“make a field on the user be ‘files’ and of type ‘list of files’ (but not the type you’ve defined)”

I don’t know how to do this any other way.

Is this correct?

Then on the Workflow, I tried to match what you wrote…

But it is not working. Sorry for being so dense. Once I get it, it will stick with me.

Any help would be very appreciated.

Did you try the workflow debugger?

Will try it right now…

Unfortunately, I could not get it.

Is there a resource that explains how to structure relational databases within Bubble?

And then a resource that explains how to upload a nested multi-file element?

Well look at your workflow and the debugger.

You’re basically saying, when the user clicks on execute, modify the user and it field Files. And the way you want to modify the field is by adding the current user’s file.

In other word, you’re saying let’s make A equal to A… Normal it won’t do much.

You should use the input’s content, and as I said in an earlier post,

1 Like

Hi @emmanuel.

Thank you so much for your patience with me on this.

I understand what is happening now, and where I was getting it wrong.

My workflow now reads:

  1. Make a change to a thing
  2. Change the current user
  3. Add to the current users list of files a list of things

Then that is where I get stuck. I am trying to get that list from From the multi-file input. But that data type is not available to me. Mismatch data type?

Yes, because there is a type mismatch. Your field is a list of Files, but that Files is defined by you, while it should be a list of files, as file in the bubble built in type library.

I renamed your type so that it’s clear…

and then, again,

So if you make a field on the user be ‘files’ and of type ‘list of files’ (but not the type you’ve defined), you’ll be able to do

when the user clicks on execute, make change to the current user and change the field ‘files’ and make it equal to the multifile input value (and send send emails, etc.).

Thanks. I will give it a shot.

Ok. That created a list of files within the user table.

But I need to add a bunch of attributes to each file. Which is why I created the file table.

How do I get each file to populate the other table?

Then you shouldn’t use the multi-file uploader, but a single file uploader. Otherwise you won’t be able to add attribute to each file.