Tuesday 14 March 2017

How to convert base64-encoded URI data to a file *server side*?

I have a URI-data string that looks like this:

data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2w..... and so on

I need to save this to a jpg on the server, and using only Javascript. As a last resort, I could use the client to write this to a canvas and then read the image from there... but I'd really like to be able to do it on the server. For some reason, this is proving to be very complicated indeed.

Ideas??



via Marc

No comments:

Post a Comment