Question:I have file input for image
Answer:You’re seeing this error because a FileReader‘s readAsDataURL takes a Blob as parameter.
You are currently passing it
undefined(check by running
imgis a File (which is a Blob), and it doesn’t have a
Passing it the file should work:
If you have better answer, please add a comment about this, thank you!