OSS File System
Categories
Component ID
2530890
Component name
OSS File System
Component type
module
Maintenance status
Development status
Component security advisory coverage
not-covered
Downloads
61
Component created
Component changed
Component body
OSS File System provides an additional file system to your drupal site, alongside the public and private file systems, which stores files in Aliyun Object Storage Service (OSS).
Requirements
- Aliyun OSS PHP SDK
- "https://patch-diff.githubusercontent.com/raw/aliyun/aliyun-oss-php-sdk/p..." patch
- "https://www.drupal.org/files/issues/imagetoolkit_plugins-2826482-2.patch" patch
- "allow_url_fopen = On" in your php.ini file (it may be enabled by default)
Installation
- Execute `composer require drupal/ossfs:1.x-dev -v` and apply above patch to OSS SDK.
- Enable the ossfs module.
- Configure OSS File System settings at "/admin/config/media/ossfs".
Configuration
- Visit the "admin/config/media/file-system" page and set the "Default download method" to "Aliyun Object Storage Service.".
- Add or edit a field of type File, Image, etc, and set the "Upload destination" to "Aliyun Object Storage Service." in the "Field Settings" tab.
- Visit the "/admin/config/content/formats" page, edit 'Basic HTML' and 'Full HTML' formats, and set the "File storage" to 'Aliyun Object Storage Service.' for inline images. If you enabled the 'Apply OSS style to images' filter, ensure it under the
"Track images uploaded via a Text Editor" filter.
Drush Commands
- "drush ossfs:upload-public": upload local public files to OSS
- "drush ossfs:sync-metadata": sync OSS metadata to local storage (database)
Please read README.md for more information.
