Vasco Fernandes
Vasco Fernandes

Reputation: 688

What is the best way to post an image to a server using AJAX?

I want the user to post an image to the server and load it back into the page when its ready, all this without leaving the page. What is the best way to do this?

Upvotes: 2

Views: 109

Answers (2)

mmattax
mmattax

Reputation: 27670

Post to and display the image in an IFrame.

Here is some more detail: http://www.openjs.com/articles/ajax/ajax_file_upload/

Upvotes: 1

jonstjohn
jonstjohn

Reputation: 60276

I would recommend the jQuery form plugin. It has support for file uploads and after completion, you could display the image back to the user.

Upvotes: 4

Related Questions