0

Possible Duplicate:
How to convert image into base64 string using javascript

I need to post an image using AJAX, but IE does not support it. So I would like to know if I can convert the image to base64 using javascript and then post that to the php script which will then decode it and save it as an image.

Is this possible?

3
  • You can upload files via AJAX even in IE. Commented Jan 29, 2013 at 9:20
  • JavaScript File API is still under development... Commented Jan 29, 2013 at 9:23
  • Okay, I used the ajaxForm plugin to asynchronously post the form data to the server, but it only works in chrome an FF, It doesn't post if viewed in IE Commented Jan 29, 2013 at 9:28

1 Answer 1

0

Rather than using JS to transform in a base64, use the enctype on the form :

<form action="your_script.php" method="post" enctype="multipart/form-data">
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.