Image Conversion from Base64 to binary in Ionic?

I have a image chosen from Camera/Gallery and i got a base64 string. Now, i want to convert this base64 string to binary format as i want to save this binary format in the server.

How can i achieve this? Is there any way to do this?