Hello, I’m struggling to upload images using the API: I’m following the same code in docs and examples, but I kee getting different errors:
the cURL command in the “Use API” page returns me “ERROR 5415: Images must be uploaded as a form, not as raw image data. Please use multipart/form-data format”
curl --request POST https://api.cloudflare.com/client/v4/accounts/abcdefghi/images/v1 \ --header 'Authorization: Bearer 123456789' \ --form 'url=https://www.nonsolocavallo.it/foto/pe00100f-c.jpg' \ --form 'id=pe00100f-c'
← same error as above
- I add to the above “**–header ‘Content-Type: multipart/form-data’ **” and I get “ERROR 5400: Bad request: multipart/form-data Content-Type has invalid syntax: lacks boundary”
The only way I made it work was using Postman, which uses as content-type application/json; charset=UTF-8, but if I try it on my code, I get “ERROR 5415: Images must be uploaded as a form, not as raw image data. Please use multipart/form-data format”
Ho can I do this? I have 70K of images to upload and I struggle to upload a single one, is there any way to use the service as a dummy a non ubertech guy?