data1
1
I am working on a form where we need to input a file and then attach the file privately to the form submission.
The setting requires attaching the file to a thing, but that thing doesn’t exist yet because the form is not yet submitted.
I don’t understand what the expected setup is in this case.
Can you help me understand? Thanks.
Regards
Zeroic
2
You can create a thing first in your DB and then attach the file to this newly created thing in the subsequent step
data1
3
Yeah I have another app where creating the thing first is applicable. In this case though we don’t want to create anything in the database first, besides the file upload is a feature that’s added to an existing project and creating the thing first would probably cause a lot of work to be re-done.
Is there just action to set the privacy of a file within workflows? It feels uncessarily constraining to have to create the database object first.
Edit: moreover our database thing creation is happening via an API at the backend.
Zeroic
4
Yeah, found another method but not sure if you’ll find it useful
Maybe you can create a “state” with “file” type and upload the file to that state. Then when you create the thing you can take the file from the custom state.
data1
6
Right, but then when you create the thing, how do you set the privacy on the file?
1 Like
data1
7
It seems there is a File Upload plugin that can do that. I’m going to test it.
data1
8
OK so the solution is to use the File Uploader plugin: File Uploader Bubble API Plugin | Bubble
- Upload the file on the file uploader without privacy.
- Send the file into (backend) workflow.
- Create the new database thing.
- Upload a new file to the file server using the File Uploader plugin, set the file to private and attach to the thing created in step 3.
- Delete the file uploaded in step 1 (or passed into the backend workflow in step 2), using Bubble’s native “delete an uploaded file” action.
Not sure who to tag @Bubble to address this question but: why do we need to rely on a third party plugin for this action? It seems like a core activity and should already be available as native action, no?
system
Closed
9
This topic was automatically closed after 70 days. New replies are no longer allowed.