How to convert camera image to jpg for upload to S3

Hi there,

I am building an app which will take a photo with camera, and following instructions on this blog: http://blog.ionic.io/10-minutes-with-ionic-2-using-the-camera-with-ionic-native/

So this leaves me with a File URI base 64 encoded. I would like to upload this to my server (nodeJS), but then convert to a file and save in S3.

Does anyone have an example of how to convert it ?