Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/grasmash/drupal-alt-stream-wrappers
https://github.com/grasmash/drupal-alt-stream-wrappers
Last synced: 18 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/grasmash/drupal-alt-stream-wrappers
- Owner: grasmash
- Created: 2019-10-02T02:31:22.000Z (about 5 years ago)
- Default Branch: 8.x-1.x
- Last Pushed: 2019-10-02T14:14:21.000Z (about 5 years ago)
- Last Synced: 2024-10-25T15:22:19.313Z (2 months ago)
- Language: PHP
- Size: 20.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This module creates a second, alternative stream wrapper for temporary files.
After installing this module, you will have both `temporary://` and `alttemporary://` streams
available.# Why might I need Alternative Stream Wrappers?
Some hosting configurations with multiple webservers use a mix of
filesystems local to each webserver and storage which is shared between the
webs (e.g. using nfs or gluster).It can sometimes be useful to, for example, use fast local storage for temp
files wherever possible, but shared storage where the webs might need to
share access to the same set of temporary files.The views_data_export module is a good example of where shared temp storage
is useful. See:This simple module allows Drupal to keep using the built-in stream wrappers
but also have the use of an alternative, shared temporary directory.Using Alternative Stream Wrappers
=================================1. Set a path for the `alttemporary://` stream wrapper.
There are a few ways to do this:
* Via the UI at /admin/config/media/file-system.
* Via `drush config:set alt_stream_wrappers.settings path.temporary '/mnt/nfs/tmp' -y`
* Via settings.php `$config['alt_stream_wrappers.settings']['path']['temporary'] = '/tmp';`2. Take advantage of this new stream wrapper by using the `alttemporary://` stream. E.g., configure DropzoneJS to use `alttemporary://` for temporary storage via `drush config:set dropzonejs.settings tmp_upload_scheme alttemporary`.