Bulk image uploads is a frequently requested feature. It's not in our user stories, but it comes up often enough that I think we should support it.

This looks promising: https://www.drupal.org/project/dropzonejs

Whatever the solution, it should support adding data to any fields additionally defined in the image entity. Flickr does this well:

Estimated difficulty: 7 (I need a couple of weeks)

Comments

balsama created an issue. See original summary.

balsama’s picture

Issue summary: View changes
StatusFileSize
new132.98 KB
phenaproxima’s picture

Issue summary: View changes
phenaproxima’s picture

We can discuss further, but I suspect this is something we should contribute to DropzoneJS, which we can then include in Lightning.

phenaproxima’s picture

Status: Active » Needs review
phenaproxima’s picture

Demoed this to Acquia's UX team. The feedback I got, just so it's recorded somewhere:

  • What's the maximum upload size? And is it per-file, or all together? This should probably be mentioned somewhere.
  • The Continue button should not be visible until all the uploads are resolved (either fully uploaded, or rejected).
  • Redirect to the media collection afterwards, rather than the last entity in the queue.
  • If the dropzone rejects an item, it still sits there with an error message and cannot be removed. Clicking the X should remove it.
  • List the accepted file extensions.

EDIT: I have crossed out the items that I implemented since we received this feedback.

phenaproxima’s picture

Title: Support bulk image entity creation » Support bulk media upload
balsama’s picture

We can't include this with Lightning until we have a standard way of ensuring consumers have the required libraries in the correct place.

Postponed on #2870739: Implement a standard method for moving external libraries into /docroot/libraries

We will however include the bulk _entity_ creation API in #2870740: Provide bulk entity creation API and the code for bulk upload in a separate repo for those that want to implement this before #2870739: Implement a standard method for moving external libraries into /docroot/libraries is resolved.

phenaproxima’s picture

StatusFileSize
new8.34 KB

Behold, the patch.

This adds a submodule to Lightning Media, called lightning_media_bulk_upload. This module provides a UI, at /admin/content/media/bulk-upload, which...allows you to bulk-upload media assets. :) Once #2870739: Implement a standard method for moving external libraries into /docroot/libraries is solved, we'll merge this module back into the mainline Lightning release.

To use the patch:

1) Apply the attached patch to your Lightning (works with HEAD, as of commit 0f57e8f, which will be in version 2.1.1 and later).

2) Install the DropzoneJS module and requisite JavaScript library.

3) If you're using DropzoneJS 8.x-1.0-alpha6 or earlier, apply the patch in #2868449: dropzonejs/integration library is missing a dependency on jquery.once to the DropzoneJS module.

phenaproxima’s picture

Status: Postponed » Active

Composer 1.5 is out and contains a fix which makes it possible to do this with Asset Packagist packages, which unblocks #2870739: Implement a standard method for moving external libraries into /docroot/libraries. This issue will be the first implementation of that fix, so this is now unblocked.

phenaproxima’s picture

Status: Active » Needs review

  • phenaproxima committed a164dcf on 8.x-2.x
    Issue #2672038 by phenaproxima: Support bulk media upload (#425, #430)
    
    
phenaproxima’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.