Hi all,
I’m looking for a way to upload files into bika.ai, and I can update a record via their API, but unfortunately, I’m struggling to understand how to convert a cURL command into a “make a request” module.
They say:
Step 1
Run this cURL command to upload your file and save the data in response for the next step:
curl ‘https://bika.ai/api/openapi/bika/v1/spaces/{SPACE_ID}/attachments’
-H “Authorization: Bearer {YOUR_ACCESS_TOKEN}”
-F ‘file=@./example.png’
Step 2
Use a PATCH request to update the record with the uploaded attachment:
curl -X PATCH “https://bika.ai/api/openapi/bika/v1/spaces/{SPACE_ID}/resources/databases/{NODE_ID}/records”
-H “Authorization: Bearer {YOUR_ACCESS_TOKEN}”
-H “Content-Type: application/json”
-d ‘{
“cells”: {
“attachmentField”: [
{
“id”: “attpcZFhfBmt6KFA4MbKKoO1”,
“path”: “openapi/teCC2LGpyEOUWZsXET9I6.png”,
“size”: 211047,
“bucket”: “bika”,
“mimeType”: “image/png”,
“name”: “teCC2LGpyEOUWZsXET9I6.png”
}
]
},
“id”: “recif5tp0iMl4y6JHwIaCtvm”
}’
Would anyone be able to provide a visual example of these two modules and their settings? Thanks so much!