开发者

Make a file picking process as automated as possible

I have a php program that needs a file th开发者_如何学Goat exists in a certain server.

I wanted to make the picking of that remote file as automated as possible.

I have this input tag:

<input name="infoFile" >

Now I'd like to have the following process as automatic as possible (except the submitting):

  • Open the file picker.
  • Fill the url into the picking space.

And then the user presses the open and the submit button.

I want to use no security exploits.

Why not making this is the server? This is an alternate to use when:

  • allow_url_fopen is set to false
  • curl is disabled.


I can't think of a good way to use the user's machine to fetch the file. The Same Origin Policy will prevent any Ajax access to the remote file, and pre-filling the file input is impossible due to security.

I think the best you can do is provide the download link for the user to click on. Alternatively, get allow_url_fopen or curl enabled - if at all possible.

Also alternatively, a Flash program should be able to fetch the remote file, and upload straight away. I'm not aware of a ready-made script for that, so it would have to be custom built.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜