wolnosciowiec / file-repository-bundle
This package is abandoned and no longer maintained.
No replacement package was suggested.
Provides an interface to connect with `wolnosciowiec/image-repository` server
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
A Symfony bundle that provides a files repository interface with error handling. Files repository allows to store static files on a cheapest storage (e.g. from $1/mo). The file repository responsibility is to redistribute the files, handle recognition and validation, de-duplication, so the main application could take only the minimum of sending files, and removing them if necessary.
Requirements:
- Symfony
Setup
- Register the bundle
new Wolnosciowiec\FileRepositoryBundle\FileRepositoryBundle(),
- In configuration step you need to put your server address, secret token and cache class name
Configuration
file_repository:
cache_class: "Doctrine\\Common\\Cache\\VoidCache"
url: "https://image-repository-test.herokuapp.com"
token: "api-key-here-for-external-remote-control"
Example usage
// 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());