开发者

HTML5 multiple file upload. more options?

I am using HTML5's multiple file 开发者_如何学Goupload feature.

I am wondering if:

  • Can you limit the number of file a user can select?
  • Can you get the order in which they were selected?

I am making a page where it lists screenshots from users. I would like to tell them that the the first image they select in the dialog box, will be the main image displayed on the index page.

However, the dialog window seems to return the selected files in alphabetical order(actually, not sure if HTML5 is doing this, or PHP).


I don't believe you can set a limit to the number of files with a built-in attribute, just multiple or not, like: <input type="file" multiple="true">

You could use javascript on the front-end to limit the number and verify on the server.

I would guess the files are listed in alphabetical order, the exact order is probably system-dependent.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜