How to upload a file to WCF using jQuery by passing filePath as param and not using HTML File tag? -


i've seen pretty sample code using html5 have develop solution works browsers. found solutions use iframe , nice ajax plug in such (https://github.com/blueimp/jquery-file-upload) samples php or use html file tag ().

i need create wcf service accepts stream , simple jquery ajax call pass file path such c:\test\file001.zip (instead of displaying file textbox browse... button user pick out file).

something like:

$.ajax( { async: false, cache: false, data:  {     "fileid" : "1234",     "filename" : "c:\test\file001.zip" }, complete: function (jqxhr, textstatus) { }, error: function (jqxhr, textstatus, errorthrown) {       alert("errorthrown: " + json.stringify(jqxhr) + '  ' + textstatus + '  ' + errorthrown )      }, success: function (data, textstatus, jqxhr) {        }, type: "post", url: "svc/test.svc/uploadfile" }); 

how do that? closest forum thread found this: working example of ajax file upload wcf service didn't seem complete answer did not work me.

i found 1 seems need no answer either: upload complex object wcf rest service jquery

thank you

you cannot pass file location. because server side not have access client computer

the example looking here: https://github.com/maxpavlov/jquery-file-upload.mvc3


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -