Ionic browser upload image to server

Hello.

As the title suggests, In the browser and with a click of a button I want to open a file dialog, pick an image file, get the file reference, encode to base64 jpeg string and then upload to server.

How can I achieve that in ionic? The file dialog and encoding part only, I figured the upload to server part.

Thanks in advance.

1 Like