javascript - Receive data in the nodejs server sent by the ajax jquery in a client -


i using ajax jquery send image nodejs server. stuck @ receiving image in nodejs server client.

client code:

jquery.noconflict();     formdata = new formdata();       jquery("#afile").on("change", function() {     var file = this.files[0];     if (formdata) {         formdata.append("image", file);         jquery.ajax({             url: "http://130.211.245.190:8080",             type: "post",             data: formdata,             processdata: false,             contenttype: false,             success:function(){}         });     }                        }); 

can me receive image in server. in advance.

i think "this" should wraped "$()"... try it...

jquery.noconflict();     formdata = new formdata();       jquery("#afile").on("change", function() {     var file = $(this).files[0];     if (formdata) {         formdata.append("image", file);         jquery.ajax({             url: "http://130.211.245.190:8080",             type: "post",             data: formdata,             processdata: false,             contenttype: false,             success:function(){}         });     }                        }); 

Comments

Popular posts from this blog

html - Firefox flex bug applied to buttons? -

html - Missing border-right in select on Firefox -

c# - two queries in same method -