HI! can somebody help me to sort this out? please?
This is my first time using Cloudflare. I need to upload images using URLs.
like there
https://developers.cloudflare.com/images/cloudflare-images/upload-images/upload-via-url/
I read the docs and tried to make a request. But I keep getting an error
’ERROR 5415: Images must be uploaded as a form, not as raw image data. Please use multipart/form-data format’
there is my code
const formdata = new FormData();
formdata.append(‘url’, “https://filepath”, “image.jpg”)
await axios({
url: https://api.cloudflare.com/client/v4/accounts/${accountId}/images/v1
,
method: “POST”,
headers: {
Authorization: Bearer ${apiToken}
',
},
body: formdata
});
tell me what i’m doing wrong