0

My application has PNG images stored as Buffers in Node.js. I would like to upload these images to Cloudflare Images.

The docs for Cloudflare Images explain how to upload an image through a dashboard or through an HTML form, but not how to upload images programmatically in Node.js.

Link to relevant Cloudflare docs: https://developers.cloudflare.com/images/cloudflare-images/upload-images/

Is there a way to directly upload images from Node.js to Cloudflare Images? If not, is there an easy way to simulate HTML form submission with a Node.js fetch?

Aaron Stanek
  • 408
  • 2
  • 9
  • it's explained here: https://developers.cloudflare.com/images/cloudflare-images/upload-images/direct-creator-upload/ First you need to request an "upload URL" (this is a GET requst), once you have the upload url, you can POST data to it. Examples from doc use curl but you can do it in node.js using - for instance - axios – GrafiCode Aug 16 '23 at 19:20

0 Answers0