In my application, users can upload multiple files in various formats, including PDF, image, and CSV. After the files are uploaded, I need to send them to Azure Blob Storage using the API Connector.
I’ve attached a screenshot of my API Connector configuration for your reference. In the file parameter, I initially uploaded a static file as a placeholder. The dynamic file value is supposed to be set in the workflow, which is triggered upon the completion of the file upload.
Workflow Configuration:
In my workflow, I am setting the dynamic data for the file name using a repeating group and assigning the dynamic data for the actual file. However, I am facing a critical issue: each time I upload a new file, the file name updates correctly in Azure Storage, but the actual file content gets overridden by the static file I used during the API Connector setup.
How can I properly configure the API Connector to accept a dynamic file link so that the uploaded file content is sent to Azure Blob Storage instead of the static placeholder?
Are there any specific steps or best practices to ensure that the dynamic file data from the workflow correctly replaces the static file in the API call?
A text file instead is getting stored in Azure Blob when I uncheck the send file option (though with the right file name as that uploaded). However, the content of the file has the Bubble URL which refers to the dynamic link in the workflow instead of the actual file uploaded.
I see, actually the file you want to upload to azure is already saved in your bubble database, that’s why it’s referencing that url, can you try uploading a raw file, or use upload a file element
@siddharth right. I’m actually storing the files in a repeating group’s state (and then on to Bubble DB) from the multi-file uploader’s value. How do i upload the file dynamically (user’s uploaded file)?
Still getting the same error where A text file instead is getting stored in Azure Blob where the content of the file has the Bubble URL which refers to the dynamic link in the workflow instead of the actual file uploaded.
If your data is overwrite by what you have set in API connector, this i Because the value in your action is empty.
First thing is to delete the API Connector file. In this case, this will send an empty value and pobably return an error instead. Always clear API connector test values.
Bubble with get the file to send it as binary from the url you have set. So no need to have a base64 function
Finally, you cannot send a list of files. Send only 1 file at a time. (you can use SAWOL) If you want to send multiple file, this is more complex and need to use raw body instead and create your own multi-form encoding body.
Removed API connector static file (got an error on initialization but ignored it, surprised it doesn’t matter)
Then put the dynamic URL of the file in the “file” parameter input of API in workflow. To cross check if URL is correct, I pasted it on a text box on the front-end too and the correct file URL is getting displayed. But I still get the API error that the file parameter is not valid
Don’t use first item’s url. Just first item. Also, you didn’t change the file name to only send 1 file.
By the way, removing test value in API Connector is done AFTER you initialize the call, not before. You don’t need to reinitialize the call after your remove the values.
Finally, actually, you change th content-type to octet-stream. This is false and something not handled by API Connector. The content-type you are sending is a multipart form-data. However, I’m not sure if Bubble allow you to overwrite the type in form-data option or not. So maybe it’s sent as form-data even if you tried to overwrite it.
Removed URL and kept it at first item, but got the same error that file parameter is not a valid file. Could you help understand what you mean change file name to send 1 item only?
If you got it working in API Connector when you initialize it, there’s no reason that it doesn’t work in run-mode. So the error is in your action settings.
Can you set your app in public view mode and share editor url in DM?