开发者

AJAX post to simulate Input type="file" path

I would like to know if its possible to make an AJAX post request to submit a file path to a form. Basically, I want to know if its possible to simulate the path a normal input type="file" would create, but in开发者_开发问答 an AJAX request. Also, is it possible for that link to be pointing to a file on another website?

I think I have no other choice since I don't have access to server-side scripts (PHP), and that is because what I want to create is a greasemonkey script (userscript).

Thanks for answers.


I think I have no other choice since I don't have access to server-side scripts (PHP), and that is because what I want to create is a greasemonkey script (userscript).

Javascript/jQuery can only help you to send the request to server but you will need the server-side language to actually upload the file. It is not possible otherwise.

However, have a look at jQuery Form Plugin.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜