shish / shimmie2

An easy-to-install community image gallery (aka booru)
http://code.shishnet.org/shimmie2/
GNU General Public License v2.0
398 stars 111 forks source link

Multiple file upload using HTML5 "multiple" input setting #279

Open skywalkar opened 11 years ago

skywalkar commented 11 years ago

Most modern browsers now support the HTML5 "multiple" setting for input boxes, so this would be a way to make multiple file upload more convenient than having to select each file individually. Since not all browsers support this feature, however, one would need to detect browser compatibility and degrade to the present method if necessary.

espressoelf commented 11 years ago

However, this feature would make it impossible (afaik) to set individual sources. So whenever you want to upload multiple images providing an individual source for each of them you would've to edit them afterwards which would be far worse.

skywalkar commented 11 years ago

Good point!

Taking that into account, then the ideal solution would actually be to keep using the existing system, but switch all of the individual file input boxes to "multiple" (and, of course, add the extra loop to handle multiple files per input box). That way: 1) A user can set multiple sources as necessary. 2) If a user has multiple images from any single source, then they may upload them all using a single upload box. 3) If a user's browser does not support the "multiple" input setting, then the fallback will be automatic; no extra conditional statements will be necessary.

espressoelf commented 11 years ago

That's actually a pretty good idea. Keep in mind, that there's still PHPs max_file_uploads

skywalkar commented 9 years ago

[BUMP]

This slipped off my radar for a while (a year and a half, has it really been that long?), and apparently it did the same here too, but I plan to change that pretty soon. (My users are beginning to push for a switch to a different image hosting solution, primarily for lack of a more convenient multiple-upload option, so a facelift is required if I want to avoid a mutiny!)

Until I get my site up to date and plugged into GitHub, here's what I remember from my first, preliminary attempt at hacking this together: ...Very little. I was having trouble with the whole extra-layer-of-iteration thing, but I'm pretty sure the real problem was that I hadn't yet found and changed all of the places that touched the Event in question.