Cómo obtener la ruta completa del archivo desde fileupload usando jquery

I have got on fileupload control as below in my html.

<input type="file" id="fuExcel" name="fuExcel">

Now I want to read full file path from above fileupload using jquery, for example if I select any file from location (d:\test\myexcel.xslx), Estoy obteniendo myexcel.xslx only from below jquery code.

var excelfilepath = $('input[type=file]').val();

preguntado el 31 de enero de 12 a las 08:01

2 Respuestas

It is not possible because is a security feature in modern browsers.

For example: if you try the code you got on IE8 you will get all path.

but if you do it in chrome or other you will get just the name of the file or a kind of "C:\fakepath\"

Espero que esto te ayude :)

Respondido el 31 de enero de 12 a las 12:01

You don't. It's a browser security issue that they really don't want you working around. There is no standards based solution that will do this in modern browsers.

Respondido el 31 de enero de 12 a las 12:01

Any other way to achieve above thing - Manoj Singh

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.