Saving Files to Bubble
Last updated
Last updated
Once your user has uploaded their files, you likely want to save it to your Bubble, or external, database.
You can approach this in two ways. Either use the simpler list states that return just one data point (see Exposed States) or use the more detailed 'Array of Files' state.
The simpler of the two. To save the file data you just need to run a basic workflow that saves the data to your database.
Using either one of the existing events (see Events) or a trigger from your own button/existing workflow, add a workflow action that reads the 'List of X' state and passes each item to the API workflow defined in step 1.
While the 'Array of Files' state does provide you with more information to save from, it requires an additional plugin and a backend workflow to work.
While I don't officially recommend or endorse a particular JSON manipulator plugin, the below example was implemented with by Opground.
Using either one of the existing events (see Events) or a trigger from your own button/existing workflow, add a workflow action that reads the 'Array of Files' state and passes each item to the API workflow defined in step 1.