Storing images to database via http?

I am sending json payload as follows to anvil http-endpoint:
{
“image”:"/cbsacakcncnacociac/==" //This is base64 encoded string for the image
}

I need to convert this base64 encoded string into bytes, then these bytes can be used in BlobMedia to create media-object that gets stored in database.

What code should go under anvil’s http.endpoint?

Goal : Sending images to anvil’s http-endpoint and storing images in database. I am trying to send the images from Ionic app and not Anvil’s client code.

1 Like