Multi-file uploads in Drupal 8?

EDIT (20.4.2013): This has been committed and is now part of D8 core.

Back at DrupalCon Munich code sprint I started to work on a core issue that is focused on implementing HTML5 multiple uploads support in Drupal. Since I've always been interested in file handling I immediatley found this very attractive. From the other hand I always strugeled when it comes to files in Drupal. There are so many solutions and none of them is really user friendly. I thought that this feature would make Drupal's UX much better. During my travel back home from Munich and the days after I spent some time working on the issue, but then it stuck somwhere in the middle due to my lack of time.

In January I started to work for Examiner.com where I got so-called Drupal day at the end of every sprint. That helped me to focus on this issue once again (and I am very thankful for that). During last 2 or 3 weeks I managed to finish the patch (in terms of features):

  • file and managed_file FAPI elements have been updated to accept #multiple option. Once this option is enabled element adds "multiple" argument to it's input tag, which enables multi-file uploads in recent versions of all major browsers. Old browsers should gracefully degrade to single-upload without any problems. 
  • File & Image field widgets leverage new #multiple option in it's underlaying form elements to improve experience for multi-value fields. Users will no longer upload galleries on file at a time. Everything can be now done in a single step.
  • Existing tests were corrected to pass with newly added features (FAPI element behaviour changed a bit).

I've already been testing, but patch still needs a lot of testing and reviews. More information can be found in the issue queue.

You can also try demo page.

Tags: 

Comments

Looks good, I'm glad work is

Looks good, I'm glad work is being put into this area.

It would be nice if there was a progress bar, or bars for each of the files, rather than the standard spinning image. Do you know if this feature is on the horizon?

Really nice work.

We use pluplaod to get multi file upload functionality in D6 (still back there), so this is of huge interest. Yet another reason for me to get off my ass and start testing D8.

THANK YOU.

dont work for me :-( ...

dont work for me :-( ... when i try multiple selection with ctrl or shift (+ click), the possible selection is just once element.
IE 9.0 on win 7 prof 64bit (all updated)
Bye

Multi-file uploads in Drupal 8? | Janez Urevc

I think that what you published made a great deal of sense.
But, what about this? what if you added a little content?
I mean, I don't wish to tell you how to run your blog, however suppose you added a headline that grabbed folk's attention?
I mean Multi-file uploads in Drupal 8? | Janez Urevc is a
little plain. You might peek at Yahoo's home page and note how they create news titles to grab people to click. You might add a related video or a related picture or two to grab people excited about everything've written.

In my opinion, it might make your posts a little bit more interesting.

Add new comment

Member of The Internet Defense League