How do you send File paths from html file inputs via Ajax?
How do you send File path开发者_如何学编程s from html file inputs via Ajax?
i tried to get it in chrome but it returned unexpected value it may be for security reasons
//i have an input of file type with name image_file
//<input type="file" name="image_file"/>
var path = $('input[type=file][name=image_file]').val();
alert(path);
/*
i got "C:\fakepath\wattan-company-view.gif"
but it is in E:\..., but IE i don't know its behavior especially its earlier versions
*/
what i want to know is what will you need the path for????? if you want to upload with ajax iframe post form jquery plugin its very easy to use
精彩评论