Upload audio file with webApi (backendless)

Hey thunkers,
iam trying to build an app where users can record sounds and upload them to a storage (backendless) by api. I can’t get the webApi component to upload the recorded audiofile.
When I save the audio file from the record component into a stored variable it seems only to story the local path. Handing this to the webapi does not do the trick. Backendless needs a - of course - a file. (File Upload - Backendless REST API Documentation)

Has anyone of you done something similar and can provide some help?

cheers, Torben

The documentation says that the API allows you to upload a local file and I don’t think you can do that from Thunkable. Someone mentioned a link that explains how to do that (potentially) but the link is unfortunately broken. It’s the top link in this post: Save and Retrieve a image file in backendless - General - Backendless Support

But if Cloudinary is still accessible in Thunkable – a lot has changed in the past couple weeks – that would probably be the way to go:

https://docs.thunkable.com/media-db

3 Likes

Hey Mate,
thanks alot! I just tried and got cloudinary to work in no time. BUT still I think it must be possible with backendless which I would really like to use.

I think I just get the part wrong where I have to “hand” the file to the api call. In the backendless docs I know that I have to make the post request with the header info “Content-Type:multipart/form-data”. I just dont know how to make the body part / hand the file to the request.

This ist what my blocks look like:

  • I removed additional blocks for error tracking etc. just to make it better readable
  • I tried handing the file in different forms like (with a key pair file:audiofile)

Any ideas are very welcome!

1 Like

I think this requires a JavaScript solution with a file picker. This is unavailable with native thubkable blocks at this time.

This is obviously not a great solution.

It would be nice to be able to send media to any media server that we want. Cloudinary is a nice option most of the time but not always what we want.

1 Like