post https://documentation.api.jestor.com/uploads/upload-base64
To upload files using Jestor API is necessary two steps to conclud it.
First step is call upload-base64 endpoint like the example below.
{
"object_id": "table_id",
"token": "API or user Token",
"file_name": "test.txt",
"content_type": "plain/text",
"base64": "ABCEXAMPLE=="
}
After you upload the file the API will return a file path. You need to keep it and hitch this file path to a record. So now is required it already have a record id
Warning: if you already have files in the record to be updated, it's important to fetch the record and then append the previously mentioned result to the files JSON, or you will lose the preexisting files.
This is an example of a JSON used to update the record with the resulting filePath:
{
"object_type":"table_id",
"data":{
"id_table_id":33,
"file_field":"[{\"id\":\"test_123\",\"ext\":\"txt\",\"name\":\"Test\",\"originalName\":\"Test.txt\",\"type\":\"file\",\"fileType\":\"plain/text\",\"file\":\"table_id/teste__0e8dbf6f0986166bf779b9a964d6bd9c.txt\"}]"
},
"token":"68c2e29e7117054d625d377afb7ef8de"
}