How to upload an image with redux-form in ReactJS?

Posted by Rohit Kumar | Updated on

Want to upload an image with redux-form in ReactJS? I recently had a similar issue and solved it by using the FileReader API to convert the blob url to Base64 (can also convert to binary string).

If you want to send a binary string instead of base64 change reader.readAsDataURL(file); to reader.readAsBinaryString(file);


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers