OSS File System

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

  1. Aliyun OSS PHP SDK
  2. "https://patch-diff.githubusercontent.com/raw/aliyun/aliyun-oss-php-sdk/p..." patch
  3. "https://www.drupal.org/files/issues/imagetoolkit_plugins-2826482-2.patch" patch
  4. "allow_url_fopen = On" in your php.ini file (it may be enabled by default)

Installation

  1. Execute `composer require drupal/ossfs:1.x-dev -v` and apply above patch to OSS SDK.
  2. Enable the ossfs module.
  3. Configure OSS File System settings at "/admin/config/media/ossfs".

Configuration

  1. Visit the "admin/config/media/file-system" page and set the "Default download method" to "Aliyun Object Storage Service.".
  2. 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.
  3. 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

  1. "drush ossfs:upload-public": upload local public files to OSS
  2. "drush ossfs:sync-metadata": sync OSS metadata to local storage (database)

Please read README.md for more information.