Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

TUS file upload protocol

No security coverage Under active development 26 sites

This module provides a file upload endpoint that supports the TUS protocol, allowing for resumable and chunked uploads of large files. This means uploads can be paused and resumed even after network interruptions or browser crashes.

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.

Drupal 8–10 · not 11

Ask your assistant about TUS file upload protocol

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
1
Tracked since
May 2024
Latest release
2 years ago
Releases (12 mo)
0
Maintenance
Dormant

Releases

Version Type Core PHP Release date
8.x-2.1 Stable 8–10 May 7, 2024