onedrop/shortresourceuri

Last activity on 05 August 2019
  • 4
  • 1
  • 993
composer require onedrop/shortresourceuri

Neos package for shortening published resource uris

1.0.1

Neos package for shortening published resource uris

Version
1.0.1
Type
neos-package
Release Date
Aug 5, 2019, 10:36:09 am
Source
git
Distribution
zip
Requires
Requires (dev)
None
Suggest
None
Provides
None
Conflicts
None
Replaces
None
MIT 15769a7cb3467d674f1efc1e42477bb8b56a6c88

Onedrop.ShortResourceUri

This Neos package changes the default behavior of the persistent resource storage.

It will publish resources with a short uri like /_media/alicecards.jpg instead of the regular /_Resources/Persistent/0d5f77e755f664b393b62ca51a056c06f05e83c6/alicecards.jpg.

It overrides the default publishing target for the persistent collection:

Neos:
  Flow:
    resource:
      targets:
        localWebDirectoryShortUriPersistentResourcesTarget:
          target: 'Onedrop\ShortResourceUri\ResourceManagement\Target\FileSystemShortSymlinkTarget'
          targetOptions:
            baseUri: '_media/'
            path: '%FLOW_PATH_WEB%_media/'
      collections:
        persistent:
          target: 'localWebDirectoryShortUriPersistentResourcesTarget'

Preventing duplicates

As we don't have a unique part in the published filename target, we must prevent this to happen. Therefore a DuplicateFilenameException will be thrown if you try to add a duplicate filename.

This could be improved in the future.

The content of the readme is provided by Github
The same vendor provides 19 package(s).