onedrop/shortresourceuri
Composer 安装命令:
composer require onedrop/shortresourceuri
包简介
Neos package for shortening published resource uris
README 文档
README
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 if you add the following configuration:
Neos: Flow: resource: targets: localWebDirectoryShortUriPersistentResourcesTarget: target: 'Onedrop\ShortResourceUri\ResourceManagement\Target\FileSystemShortSymlinkTarget' targetOptions: baseUri: '_media/' path: '%FLOW_PATH_WEB%_media/' collections: persistent: target: 'localWebDirectoryShortUriPersistentResourcesTarget'
Since v1.2.0 this must be added manually and is no longer default included. This way it is possible to for example only enable this in production context.
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.
统计信息
- 总下载量: 994
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 6
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-09-24