sqram
sqram

Reputation: 7201

HTML5 multiple file upload. more options?

I am using HTML5's multiple file upload feature.

I am wondering if:

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).

Upvotes: 4

Views: 751

Answers (1)

ldg
ldg

Reputation: 9402

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.

Upvotes: 4

Related Questions