react-images-upload
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?
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!
did you find any solution yet ?
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.
they should really put that it receives 2 arguments on the usage example