Upload pic to my own server

Hello people. I am trying to run a block that when a user takes a pic on the camera, the pic gets uploaded to my own server, where I can run some logic over it. Why not Cloudinary? Well, I am greedy and I am tying to improve performance instead of sending it to Cloudinary, get a URL of the pic, and only then call my server to run the logic :smile: At least I’d like to give it a chance before giving up…

I saw some very old posts attempting to do similar things, but they are old and some of the links and explanations seem invalid, so I am trying to ask again.

So, my working curl request (assuming that I get from the camera an actual file) allowing me to upload images and files, looks like:
curl -X POST -F ‘password={password}’ -F ‘image=@{my_image_file}’ “{http_address}”

I have attempted several ways on Thunkable and failed so far. Here is a recent attempt:

Does anyone have any advice or good experience in something like this?

Referencing here some of the “leaders” that I found on old related topics:
@tatiang , @muneer , @jared .

Many thanks in advance.

Hello @royrosemarin!
The image should be in base64.

We have discussed also in the following topic about how to send an image via WebAPI WEB API Firebase Storage It does not upload the file to the server - #4 by ioannis

Currently using the file picker is super limited in the sense that you are locked into a intermediary backend ie Cloudinary. The idea is to upload to cloudinary which returns a public URL. You then pass the returned image url to where you need the data (including the image or file url) to go

I’d you need to store the files elsewhere, first upload to cloudinary, then pass the url to a cloud function that saves the fuel from the url to a backend of your choice.

Thank you for your replies both! I honestly don’t understand how to implement the Base64 solution, especially for a photo just taken on a camera, and I don’t even know what the “Photo” object that I pass really is (a file location, file object, Base64). I’ll default to cloudinary for now.

2 Likes