wolnosciowiec / file-repository-bundle
此包已被弃用且不再维护。没有建议替代包。
提供连接到 `wolnosciowiec/image-repository` 服务器的接口
v2.1.0.1b
2018-02-13 19:10 UTC
Requires
- php: >=7.1
- guzzlehttp/guzzle: ^6.2
- wolnosciowiec/paginator-bundle: ~1.0
Requires (Dev)
- doctrine/annotations: >=1.3
- phpunit/phpunit: ^5.4
- symfony/form: >=2.8
- symfony/framework-bundle: >=2.8
- symfony/twig-bundle: >=2.8
- symfony/validator: >=2.8
- symfony/var-dumper: ^3.2
This package is not auto-updated.
Last update: 2020-09-18 21:21:24 UTC
README
这是一个 Symfony 扩展包,提供文件存储接口并处理错误。文件存储允许将静态文件存储在成本最低的存储上(例如每月1美元)。文件存储的责任是重新分配文件,处理识别和验证,去重,以便主应用程序只需发送最小数量的文件,并在必要时删除它们。
要求
- Symfony
设置
- 注册扩展包
new Wolnosciowiec\FileRepositoryBundle\FileRepositoryBundle(),
- 在配置步骤中,您需要输入服务器地址、秘密令牌和缓存类名称
配置
file_repository:
cache_class: "Doctrine\\Common\\Cache\\VoidCache"
url: "https://image-repository-test.herokuapp.com"
token: "api-key-here-for-external-remote-control"
示例用法
// upload an image to the file repository
// the repository handles itself de-duplication, so we don't need to take care of it
// in the application
$this->uploader->uploadFromUrl($event->getBackgroundImage());