Images Creater Direct Upload

I need help with Cloudflare Images Creator Direct Upload

client/v4/accounts/<ACCOUNT_ID>/images/v2/direct_upload
should provide the upload url but it returns the following error:

ERROR 5415: Images must be uploaded as a form, not as raw image data. Please use multipart/form-data format

Also my code was working fine until a few days ago

1 Like

Dont know if they have a bug or not. As i have the same issue. This used to work, but now im getting this error.
From their documentation i think they added a form data requirement, adding the --form requireSignedURLs=true seems to work correctly again

curl --request POST --url https://api.cloudflare.com/client/v4/accounts/<accountKey>/images/v2/direct_upload --header 'Authorization: Bearer <apikey>' --form 'requireSignedURLs=true'

1 Like

We identified an issue and fix is on its way. until then there is indeed a workaround to add some data to the form, like metadata or requireSignedURLs

https://api.cloudflare.com/#cloudflare-images-create-authenticated-direct-upload-url-v2

but take into account that requireSignedURLs=true will make images private, when requireSignedURLs=false is default and essentially no-op.

1 Like

This has been fixed, sorry for inconvenience

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.