0

How can I have the user upload an image, then without sending it to a server give me the base64 version of the image?

herohamp
  • 443
  • 2
  • 9
  • https://developer.mozilla.org/en-US/docs/Web/API/FileReader/readAsDataURL But why do you need a b64 version of it ? If it's only to display it in the page, then use https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL – Kaiido Jul 02 '17 at 02:11
  • Possible duplicate of [Preview an image before it is uploaded](https://stackoverflow.com/questions/4459379/preview-an-image-before-it-is-uploaded) – Kaiido Jul 02 '17 at 02:15

0 Answers0