开发者

Javascript Input type

In javascript we use input type = file .. to open up a file browser pop-up .. is there a way to limit access to folders .. I want to select a fold开发者_如何学Cer then ftp all the files in the folder .. so i need access upto only the folder level and not file level .. i guess it would be tedious to go an manually select every file from the folder and then ftp .. is there a way to do that.. Also, how can i set the file-browser pop-up window path to a default one ?


You need to take advantage of Flash or similar to enabled extended file upload options.

e.g. SWFUpload will allow you to filter out:

  • file types: *.gif, *.doc, *.zip etc.
  • file size: max etc.
  • multiple files

etc.


You can not do that in standard JavaScript - it's a functionality that is browser dependent.

It may be exposed via Flash or some other custom browser plugin.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜