This project is not covered by Drupal’s security advisory policy.

Adds a file upload endpoint that supports the chunking, resumable, TUS file transfer protocol (https://tus.io/) using tus-php (https://github.com/ankitpokhrel/tus-php).

Upload large files (potentially infinite file size uploads!) with ease.
Even through a network outage, browser closing or crash, come back and resume the upload where it left off.

Installation instructions:

  1. Download & enable this module via composer
  2. Ensure these headers in your services.yml CORS settings:
    • 'upload-checksum', 'upload-concat', 'upload-key', 'upload-length', 'upload-metadata', 'upload-offset', 'location', 'tus-checksum-algorithm', 'tus-extension', 'tus-max-size', 'tus-resumable', 'tus-version'
  3. Choose a client (https://tus.io/implementations.html). Uppy is highly recommended, whether you use it with a front end JS framework like Vue or React, or the module available here on drupal.org: Uppy.

Special instructions if using a custom upload client:

  1. Ensure it passes these values in the header Upload-Metadata on upload (example values given):
    • entityType: 'node',
      entityBundle: 'article',
      fieldName: 'field_image'
  2. It also must implement an on-complete callback method, and pass these parameters (using Uppy as an example):
    • .on('upload-success', (file, response) {
        await this.$http.post('/tus/upload-complete',
          {
            'file': file,
            'response': response
          })
      }

Compatible modules:

Uppy File Uploader.

Project information

Releases