W
W
WonderMetal2014-08-17 13:48:51
JavaScript
WonderMetal, 2014-08-17 13:48:51

How to convert a file to Base64 JavaScript?

Folks ,
<input type="file" class="input-xlarge" id="file">
file = $('#file').val()
how do I get the b64 of the selected file?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Evgeny Petrov, 2014-08-17
@Petroveg

To work with files, you will need to use either FileReader or FormData .
Read more:
HTML5 file upload features
HTML5 Drag and Drop file upload

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question