如何在选择文件时获取文件的完整路径 <input type=‘file’>
<input type="file" id="fileUpload">
<script type="text/javascript">
function getFilePath(){
$('input[type=file]').change(function () {
var filePath=$('#fileUpload').val();
});
}
</script>
Run Code Online (Sandbox Code Playgroud)
但filePath var包含only name所选文件,而不是full path.
我在网上搜索过,但出于安全考虑,似乎浏览器(FF,chrome)只是给出文件名.
有没有其他方法来获取所选文件的完整路径?