Skip to main content
June 23, 2022
Question

Uploading an image with the API POST Request

  • June 23, 2022
  • 1 reply
  • 0 views

I want to upload an image with the POST request and retrieve it from database. How can I do that?

1. To which datatype can we assign the document?

2. How can we convert to image into base64?

3. How can we encode and decode? 

    1 reply

    harshitb6843
    June 23, 2022
    1.  You can store the document ID in an integer column
    2. When passing the document to the API, just wrap the id in todocument and it will be done.