mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
c13b5d989f
API Enable relative root paths for the default Flysystem AssetAdapter
38 lines
1.1 KiB
YAML
38 lines
1.1 KiB
YAML
---
|
|
Name: assetstore
|
|
---
|
|
Injector:
|
|
# Public url plugin
|
|
FlysystemUrlPlugin:
|
|
class: 'SilverStripe\Filesystem\Flysystem\FlysystemUrlPlugin'
|
|
# Define the default adapter for this filesystem
|
|
FlysystemDefaultAdapter:
|
|
class: 'SilverStripe\Filesystem\Flysystem\AssetAdapter'
|
|
# Define the default filesystem
|
|
FlysystemBackend:
|
|
class: 'League\Flysystem\Filesystem'
|
|
constructor:
|
|
Adapter: '%$FlysystemDefaultAdapter'
|
|
calls:
|
|
PublicURLPlugin: [ addPlugin, [ %$FlysystemUrlPlugin ] ]
|
|
# Define our SS asset backend
|
|
AssetStore:
|
|
class: 'SilverStripe\Filesystem\Flysystem\FlysystemAssetStore'
|
|
properties:
|
|
Filesystem: '%$FlysystemBackend'
|
|
AssetNameGenerator:
|
|
class: SilverStripe\Filesystem\Storage\DefaultAssetNameGenerator
|
|
type: prototype
|
|
# Image mechanism
|
|
Image_Backend: GDBackend
|
|
# Requirements config
|
|
GeneratedAssetHandler:
|
|
class: SilverStripe\Filesystem\Storage\FlysystemGeneratedAssetHandler
|
|
properties:
|
|
Filesystem: '%$FlysystemBackend'
|
|
Requirements_Minifier:
|
|
class: SilverStripe\View\JSMinifier
|
|
Requirements_Backend:
|
|
properties:
|
|
AssetHandler: '%$GeneratedAssetHandler'
|