symfony-bundle file-bundle
File Bundle
da-vinci-studio/file-bundle
File Bundle
- Tuesday, July 26, 2016
- by itcraftsmanpl
- Repository
- 3 Watchers
- 0 Stars
- 7 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 2 Versions
- 0 % Grown
file-bundle
Installation
-
Add bundle into composer.json, (*1)
composer require da-vinci-studio/file-bundle, (*2)
-
Register bundle in AppKernel, (*3)
public function registerBundles()
{
$bundles = [
// ...
new \Dvs\FileBundle\DvsFileBundle()
];
}
Using FileReceiver
FileReceiver provides a way to save files in a specific localization via FlySystem.
It will take care of your file's name and path generation needed for correct saving., (*4)
- Create a directory for file saving (e.g. document in root_dir)
-
Register directory in parameters.yml, (*5)
document_upload_dir: document, (*6)
-
According to FlySystem documentation
register file system in config.yml in connection with created directory, (*7)
dvs_file:
filesystems:
pp_standard:
adapter:
local:
directory: "%kernel.root_dir%/document"
-
Register FileReceiver as a dependency using id: dvs.file_receiver, (*8)
dev-master
9999999-dev
File Bundle
Sources
Download
The Requires
The Development Requires
v0.1.0
0.1.0.0
File Bundle
Sources
Download
The Requires
The Development Requires