Hello, images docs are wrong. Need urgent fix!
this is how you can create direct_upload v2 url with Node.js Axios.
The backend of cf is fault. It wants multipart form even on that json request. It has bug. I’m paying for this product. Fix it !!! direct_upload is not a image upload endpoint, it’s a basic json endpoint for creating direct_upload URL.
await axios.post(
`https://api.cloudflare.com/client/v4/accounts/${cfAccountId}/images/v2/direct_upload`,
{},
{
headers: {
Authorization: `Bearer ${cfApiKey}`,
"Content-Type": "application/x-www-form-urlencoded",
},
}
);
Fault docs url: