Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
What does this module do?
The Xsendfile module enables fast transfer for private files in Drupal using the Xsendfile webserver module (Apache) or X-Accel-Redirect (Nginx). It does this by letting the webserver handle the private file transfer, instead of letting Drupal send the file response.
Currently file downloads and image derivative downloads (created by image styles) are supported (8.x-1.x).
Installation
- Install the module as usual.
- Enable private files. For information on how to do so, see https://www.drupal.org/docs/8/core/modules/file/overview#s-private-file-...
- Go to /admin/config/media/file-system/xsendfile and enable either "Files transferred by Nginx using X-Accel-Redirect" or "Files transferred by Apache using xsendfile", depending on your webserver type.
- For Nginx: Copy/paste the suggested config (see README.txt), and reload Nginx.
Please note: The Nginx configuration is untested. If you use this module with Nginx, please report your findings. Thanks! - For Apache: install the xsendfile Apache module (https://tn123.org/mod_xsendfile/), copy/paste the suggested config (see README.txt), and reload Apache.
Project information
- Seeking co-maintainer(s)
Maintainers are looking for help reviewing issues. - Maintenance fixes only
Considered feature-complete by its maintainers. - Module categories: Performance
- 74 sites report using this module
- Created by marcoka on , updated
- Stable releases for this project are covered by the security advisory policy.
Look for the shield icon below.
Releases
8.x-1.2
released 28 November 2023
Works with Drupal: ^9 || ^10
✓ Recommended by the project’s maintainer.
Install:
Development version: 8.x-1.x-dev updated 28 Nov 2023 at 23:19 UTC