Using Composer to Install the Plupload Library

Last updated on
4 November 2023

The Plupload library can be installed via composer or manually, downloading it and placing in the adequate location. Manual installation instructions exist at the old versions documentation page, just follow the d8 instructions.

The library installation status can be checked in any moment in your Drupal site status page at /admin/reports/status.

Library installation

1. Add a custom package to the root composer.json file. Its repositories key looks like the following:

    "repositories": [
        {
            "type": "composer",
            "url": "https://packages.drupal.org/8"
        },
        {
            "type": "package",
            "package": {
                "name": "moxiecode/plupload",
                "version": "2.3.9",
                "type": "drupal-library",
                "dist": {
                    "url": "https://github.com/moxiecode/plupload/archive/refs/tags/v2.3.9.zip",
                    "type": "zip"
                }
            }
        }
    ]

2. Require the library

composer require moxiecode/plupload

Remove library examples directory

The Plupload library contains an examples folder which you should remove, see http://drupal.org/node/1903850.

It can be done in composer with these instructions:

1. Add the following patch to the "extras/patches" section of your root composer.json:

    "extra": {
        "patches": {
            "moxiecode/plupload": {
                "Issue 1903850: Remove plupload library examples folder": "https://www.drupal.org/files/issues/2021-11-10/plupload-rm_examples_2_3_7-1903850-38.patch"
            }
        }
    }

2. Install composer patches plugin if you haven't it yet:

composer require cweagans/composer-patches
composer install

Help improve this page

Page status: No known problems

You can: