media-ui icon indicating copy to clipboard operation
media-ui copied to clipboard

Bind AssetSources to a ResourceCollection

Open DrillSergeant opened this issue 4 years ago • 3 comments

Use Case

As an editor I want to be able to store some assets in another assetSource (i.e. to prevent them from being public accessible).

Idea

Part 1: Allow to configure a ResourceCollection for AssetSources

AssetSources should be able to have a ResourceCollection configured:

Neos:
  Media:
    assetSources:
      'neos':
        assetSource: 'Neos\Media\Domain\Model\AssetSource\Neos\NeosAssetSource'
        assetSourceOptions:
          icon: 'resource://Neos.Media/Public/Icons/NeosWhite.svg'
          description: 'Assets in the local asset storage'
          # asyncThumbnails: defaults to the value of Neos:Media:asyncThumbnails
          asyncThumbnails: ~
      'neos-protected':
        assetSource: 'Neos\Media\Domain\Model\AssetSource\Neos\NeosAssetSource'
        assetSourceOptions:
          icon: 'resource://Neos.Media/Public/Icons/NeosWhite.svg'
          description: 'Protected assets in the local asset storage'
          resourceCollection: 'protectedResources'

Part 2: Use the configured ResourceCollection to store assets

This resource collection should be used to store the uploaded asset-resources of this AssetSource.

Part 3: Allow the configuration of allowed assetSources for node properties

  • When displaying the upload-editor for an asset, the assetSource (and it's configured resource collection) should be used to store uploaded assets
  • When showing the media browser overlay of an asset propery, only the configured assetSources should be visible in the media browser overlay

DrillSergeant avatar Jun 22 '20 10:06 DrillSergeant