Download the PHP package 4oh3/live-files without Composer
On this page you can find all versions of the php package 4oh3/live-files. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download 4oh3/live-files
More information about 4oh3/live-files
Files in 4oh3/live-files
Download 4oh3/live-files
More information about 4oh3/live-files
Files in 4oh3/live-files
Vendor 4oh3
Package live-files
Short Description Serves images (and optionally other public files) from the live site instead of the local files directory. Intended for local development only.
License GPL-2.0-or-later
Homepage https://github.com/4oh3/live-files
Package live-files
Short Description Serves images (and optionally other public files) from the live site instead of the local files directory. Intended for local development only.
License GPL-2.0-or-later
Homepage https://github.com/4oh3/live-files
Please rate this library. Is it a good library?
Informations about the package live-files
Live Files
Live Files serves images (and optionally other public files) from your live site, so a local copy of a Drupal site displays them without the files directory. Intended for local development only.
Installation
With Composer
Without Composer
- Download main.zip.
- Unzip it into your custom modules folder (e.g.
web/modules/custom) and rename thelive-files-mainfolder tolive_files. - Enable the module:
Configuration
Enter the live site URL at Configuration → Development → Live files (/admin/config/development/live-files), or set it with Drush:
Keep it out of config sync
Add this to your local-only settings.local.php so the module is never exported with drush cex (and deployed to production), and isn't uninstalled when you run drush cim:
Settings
- Live site URL: for example
https://www.example.com. Leave empty to serve everything locally. Enter the address only. Browsers block image URLs that contain a username and password, so do not put htaccess credentials in this field. - Files to serve from the live site: all files, or only files missing locally.
- Non-image files: optionally serve PDFs, documents and video from the live site too.
- HTTP authentication: optional username and password for a live site protected by htaccess. This site fetches those files and sends the credentials. The password is stored in the module configuration. Leave both empty for a public live site. Clear the username and save to remove a stored password.
How it works
- File URLs generated by Drupal (image fields, image styles, responsive images, media, Twig
image_style/file_url) are rewritten to point at the live site. - Requests for missing local files (e.g. images hard-coded in body text or CSS) are redirected to the same path on the live site.
- With HTTP authentication set, those URLs stay on the local site. The local site fetches the file from the live site and sends the username and password.
- A file that exists on this site but not on the live site, such as one just uploaded, is served from this site. Image styles for that file are generated here.
- Image styles for files that exist only on the live site may not load when they have never been generated there, because the
itoktoken is built with the local hash salt.
All versions of live-files with dependencies
PHP Build Version
Package Version
Requires
drupal/core Version
^10 || ^11
The package 4oh3/live-files contains the following files
Loading the files please wait ...