InfinityRazz Posted May 28, 2021 Posted May 28, 2021 Hey guys, I've created a database with a field labeled Image & have set the field type to Upload The goal is to upload images to this field using the API : YourSite.com/api/cms/records/{database_id}/{record_id} Although I am not entirely sure how to correctly attach the file to the POST request, I've tried : Sending the base64 information of the picture through the body of the request with the key fields[67] (the same field as mentioned previously) Sending the physical file through the body as under the key fields[67] Sending both the Base64 info or just the attached file as raw binary. All of my tests have been down via Postman. Please if anyone has any suggestions on where I may find some more info, That would help a lot thanks.
Stuart Silvester Posted June 1, 2021 Posted June 1, 2021 It doesn't look like we specifically handle images/uploads via the REST API for this endpoint. I have logged an internal bug report for this. InfinityRazz 1
InfinityRazz Posted June 2, 2021 Author Posted June 2, 2021 21 hours ago, Stuart Silvester said: It doesn't look like we specifically handle images/uploads via the REST API for this endpoint. I have logged an internal bug report for this. I'm assuming solution in the meantime would to be use some sort of external file storage, and post urls between that api and the rest api for our site? The end goal here is to have software running on a users PC that will broadcast an image of said software, and some basic data to a database where users can only see their own posts. This would allow users to keep track of the software while on the go using a "Remove Viewer" page on the site. Though this has been a tad bit of a struggle due to this issue 😅
Recommended Posts