How get a real path value to file that store local on HDD from input or FileUpload?
I have two file uploaders:
<input name="targetFile" runat="server" id="File1" type="file" />
<asp:FileUpload ID="FileUpload1" runat="server" />
When I click to choose file (for exa开发者_StackOverflowmple D:\Test.txt) the way to file appears on control, but when I get value control in javascript:
obj = document.getElementById("File1");
value of the path to file store local:
obj.value = "C:\fakepath\Test.txt"
I need to get actualy "D:\Test.txt" string on javascript. Can it be done?
Do you have a
subst D: C:\fakepath\
?
or how do you mix c: and d:?
精彩评论