post an image of the input file using javascript to the php file

advertisements

is any way to post the image object to php file using javascript that can be alternative for the regular way of uploading image using (enctype="multipart/form-data") ?

I had successfully post values of input text boxes using ajax, any way to post input file fields ?

Thanks


There are several techniques for this.

One is to utilize an iFrame for the upload. Check this out: http://www.ajaxf1.com/tutorial/ajax-file-upload-tutorial.html