0

I have an HTML5 canvas image that I want to save from one page and use it on another page (by uploading the image into storage, AWS S3). I don't want to upload it to S3 on the first page.

What is the best strategy for this?

Possible solution

  1. save the canvas as a dataURL / buffer ?
  2. save that file to the user's device (local storage)?
  3. on the new page retrieve the file
  4. post image / file to S3
grabury
  • 4,797
  • 14
  • 67
  • 125
  • If you're navigating from the canvas page to the page you want to upload from, you can pass that image data to the new page on navigation. [React Router Example](https://stackoverflow.com/a/52238733/6027891) – Ace Jun 09 '22 at 06:10
  • You may refer to https://stackoverflow.com/questions/44567511/downloading-canvas-image-using-toblob – Miller Cy Chan Jun 09 '22 at 06:26
  • 1
    Does this answer your question? [upload canvas image to S3 server](https://stackoverflow.com/questions/24694629/upload-canvas-image-to-s3-server) – Yogi Jun 09 '22 at 06:54

0 Answers0