Issue sending files dynamically with API

Hi all,

I need help programming the Bubble connector API.

I have a flask app running on Heroku that converts musicxml files in formatted chords. I would like to upload the file from my computer, send through a POST request on the flask app and retrieve the formatted chords and display them in a Bubble group.

Sending a static file works like a charm.

However, I am struggling to get this working with dynamically sending files.

Can you help? Thanks!
Glenn

Hi Glenn! What’s the issue when you’re sending the file as a dynamic field from your workflow action?

Hi Zeroic,
Thanks for replying to my post.

Well, I do not know how to send a file as a dynamic field. I can easily select a file and send it as a static file (as shown in the screen shot in OP), however, I cannot figure how to instruct the API to ask for a file from my computer.

Do you mean that the API configuration is correct but the issue is the worflow configuration instead?

Thanks!

Yes, that’s right. The API is fine. When you are using this in your workflow, you will have a parameter to send the file as well. You can specify the URL of the file there and Bubble will do the rest

Thanks!

Here is my workflow configuration.


Unfortunately, Bubble returns always the same result, which is the one of the file provided in the API.

I think there is a problem with the file being statically provided in the API, no?
Thanks!
Glenn

Here, you need to click on the Dynamic link and you can specify the link you wish to send. Now this can be the file uploaded by a user in a FileUploader element in Bubble, etc

I have set up the workflow correctly. The problem is that in order to have the API working, I cannot do anything else but to give the API a static file…

How can I tell my API to accept files stored in the Bubble App data? I believe that the current setup forces the API to send the static file overriding my file sent from the App database.
Which parameter do I need to instruct my API with in order to have this working?
I do not know if I am clear enough… :sweat_smile:

Can you share the API Workflow settings?

Sure!

First, let me show you the front end.
image
I select the file with the File Uploader, then I click Save file to store the file in the database, and then I click on Send to API.

In the final version, I will have only 1 button to store and send the file to the API.
Now, the workflow settings.



Thanks for your help!

Hi,
Nobody? @Jici ?
Thanks!

I don’t see any place where you send the file with you upload action. The Content-type header shouldn’t be modified (same for accept header). You can keep both private.
Where is your “file” field? Make sure it’s not set as “private”. You can also clear value in API connector
Are you sure you are using the corect Call?
You should have something like @Zeroic show in is screenshot for the file.