react-images-upload icon indicating copy to clipboard operation
react-images-upload copied to clipboard

In which format does the image live in the state, or what exactly should I upload to firebase storage?

Open dhuber666 opened this issue 7 years ago • 3 comments

Hi guys!

So in what format does it save the picture in the state? Is it an byte array? A blob?

Can't find it out on myself. I logged the state, but there are just props for filename, and when it was last changed. Where is the prop that is the actual image data?

Thank you guys!

dhuber666 avatar Oct 30 '18 15:10 dhuber666

did you find any solution yet ?

amitbravo avatar Feb 12 '19 06:02 amitbravo

It's a blob.

onChange attribute takes a function which takes 2 arguments (only 1 shown in the documentation). I went through the source code and realized that you get a file as a second argument e.g.

handleChange(picture, file)...

Hope it helps.

agjs avatar Apr 09 '19 19:04 agjs

they should really put that it receives 2 arguments on the usage example

Jared-Dahlke avatar Jul 05 '19 19:07 Jared-Dahlke