c# - fakepath while File Upload -


i using jquery upload file on server gets replaced fakepath :

my path should "c:\users\download\filename.xls" gets replace "c:\fakepath\filename.xls"

i used approach solve above problem :

var selectedpath = $('input#filedata_file').val().split('\\').pop();//filename.xls

but gives filename , eliminates path , how fullpath filename.

 var srccontent; // give file   function readurl(input) {              if (input.files && input.files[0]) {                  var reader = new filereader();                  reader.onload = function (e) {                      srccontent = e.target.result;                  }                  reader.readasdataurl(input.files[0]);              }          } $("#inputfile").change(function () {                  if (this.files[0].name != "") {                                          readurl(this);                  }                              }); 

Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -