When I select a file and try to upload it to the server, the path of the local file appears to be as
C:\\\\fakepath\\filename.png
.
I understand that this is a security feature browsers have adapted, but the How can I get the real path in-order to upload the file from my node.js
method ?
HTML
<input type="file" name="file" id="pdffile" />
<a id="showHidden" class="btn btn-warning">button</a>
JQUERY
$('#click').click(function(){
var data = {};
data.title = $('#subfile').val();
data.message = "message";
$.ajax({
url: "/fillll/path",
type:'post',
data: JSON.stringify(data),
context: document.body
});
});
Note: I have seen many post on this topic here and here, however i couldn't still solve my problem.