Skip to content

da-vinci-studio/file-bundle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

file-bundle

###Installation

  1. Add bundle into composer.json

composer require da-vinci-studio/file-bundle

  1. Register bundle in AppKernel

      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.

  1. Create a directory for file saving (e.g. document in root_dir)
  2. Register directory in parameters.yml

document_upload_dir: document

  1. According to FlySystem documentation register file system in config.yml in connection with created directory

      dvs_file:
        filesystems:
          pp_standard:
            adapter:
              local:
                directory: "%kernel.root_dir%/document"
    
  2. Register FileReceiver as a dependency using id: dvs.file_receiver

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages