{"repo":"Warxcell/files","free":true,"listed":false,"github":"https://github.com/Warxcell/files","clone":"git clone https://github.com/Warxcell/files.git","description":"Upload and represent files as Objects, ORM Entities or ODM Documents. A simple Symfony bundle to ease file uploads and management.","language":"PHP","stars":18,"topics":["php","files","file","file-upload","file-uploader","file-manager","file-management","orm","doctrine","symfony"],"license":"MIT","category":"databases-storage","readme_excerpt":"About Provides easy file management (with persistence layer for metadata). - Uses FlySystem for File management (this allows you to use existing adapters to save files anywhere) - Persist file information in database - Uses checksums (md5) to prevent double upload (thus saving space). If same file is found - it's reused - Automatic hooks that manages the files (on entity persist file will be uploaded, on entity remove - file will be removed) - Different naming strategies for handling files. Usage Configuring Create the object which will holds the file In case you want to use embeddable instead of Entity for file object: Create the repository. Or using plain services: or using pure PHP Upload file In case of embeddable: Please note that file is not actually moved to its final location until file is persisted into db, which is done by Listeners. (Arxy\\FilesBundle\\DoctrineORMListener for example) Upload using form Type: Read file content Read stream This bundle also contains form and constraint for uploading and validating files. You can write your own naming strategy how files are created on Filesystem. You can even write your own FileSystem backend for Flysystem and use it here. Currently, only Doctrine ORM is supported as persistence layer. Feel free to submit PRs for others. Serving files from controller 1. Serving with Controller Create the controller which will serve files. If you want to force different download name, you can decorate file with Arxy\\FilesBundle\\Utility\\Do","default_branch":null,"files":null,"tree":[],"storefront":"/r/Warxcell","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/Warxcell/files/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}