onurzorluer / react-image-file-resizer

Resize Local Images with React 🌄 🌅
MIT License
317 stars 41 forks source link

Encode base64 via atob or btoa method #48

Closed cristianghita24 closed 3 years ago

cristianghita24 commented 3 years ago

Is your feature request related to a problem? Please describe. If a base64 encoded image using react-image-file-sizer gets sent a REST API then tried to be saved to Firebase Storage then Firebase will throw as it uses atob to decode. This issue is better described here

Describe the solution you'd like An optional parameter to the api that specifies the encode method (i.e. atob)

Describe alternatives you've considered I've tried using alternatives but it would mean using multiple apis as I need file conversion and resizing as well.

Additional context Please check the stackoverflow link mentioned above.