N
N
Nikita Sklyuev2012-02-11 22:31:19
PHP
Nikita Sklyuev, 2012-02-11 22:31:19

javascript and image wrapping in base64

Greetings dear HabrPeople.
Somewhere I met information that you can use JS to pack an image in base64 and send it to the server with simple ajax. Now there is an urgent need for such an approach, but I can not find the information.

Please tell me how much this method is cross-browser, and where can I get information on this topic?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
[
[email protected]><e, 2012-02-11
@barmaley_exe

Canvas has a toDataURI method, which is what you want.

N
Nikita Sklyuev, 2012-02-11
@trilodi

But then IE falls off?!

N
Nikita Sklyuev, 2012-02-11
@trilodi

I need to send a file to the server and not display it in the browser, but it needs to be sent in base64

W
winbackgo, 2012-02-12
@winbackgo

phpjs.org is here to help. There is a function base64_encode.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question