PHPackages                             burzum/file-storage - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. burzum/file-storage

AbandonedArchivedCakephp-plugin[File &amp; Storage](/categories/file-storage)

burzum/file-storage
===================

This plugin is giving you the possibility to store files in virtually any kind of storage backend. This plugin is wrapping the Gaufrette library (https://github.com/KnpLabs/Gaufrette) library in a CakePHP fashion and provides a simple way to use the storage adapters through the StorageManager class.

2.1.0(7y ago)194116.3k↑22.5%85[7 issues](https://github.com/burzum/cakephp-file-storage/issues)[1 PRs](https://github.com/burzum/cakephp-file-storage/pulls)MITPHPPHP &gt;=7.0.0

Since Jul 23Pushed 5y ago29 watchersCompare

[ Source](https://github.com/burzum/cakephp-file-storage)[ Packagist](https://packagist.org/packages/burzum/file-storage)[ Docs](http://github.com/burzum/cakephp-file-storage-plugin)[ RSS](/packages/burzum-file-storage/feed)WikiDiscussions 4.0 Synced 1mo ago

READMEChangelog (10)Dependencies (8)Versions (41)Used By (0)

FileStorage Plugin for CakePHP
==============================

[](#filestorage-plugin-for-cakephp)

[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.txt)[![Build Status](https://camo.githubusercontent.com/231981f33054fb2013e394a98f882d0767ae14c1c1187e0352e6985aebe0b9c9/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6275727a756d2f63616b657068702d66696c652d73746f726167652f332e302e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/burzum/cakephp-file-storage)[![Coverage Status](https://camo.githubusercontent.com/dfa8e9c17a86f40e7e5ae4269fa0e338b4dc1c506bcd583a58821e4176e1b349/68747470733a2f2f696d672e736869656c64732e696f2f636f766572616c6c732f6275727a756d2f63616b657068702d66696c652d73746f726167652e7376673f6272616e63683d332e302e7376673f7374796c653d666c61742d737175617265)](https://coveralls.io/r/burzum/cakephp-file-storage)[![Code Quality](https://camo.githubusercontent.com/7cdd3274e475e9f9dee8ef511bf81f8b115ae1de628f16752eecad54df6bc55c/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6275727a756d2f63616b657068702d66696c652d73746f726167652e7376673f6272616e63683d332e303f7374796c653d666c61742d737175617265)](https://coveralls.io/r/burzum/cakephp-file-storage)

**If you're upgrading from CakePHP 2.x please read [the migration guide](docs/Documentation/Migrating-from-CakePHP-2.md).**

The **File Storage** plugin is giving you the possibility to upload and store files in virtually any kind of storage backend. The plugin features the [Gaufrette](https://github.com/KnpLabs/Gaufrette) **and** [FlySystem](https://github.com/thephpleague/flysystem) library in a CakePHP fashion and provides a simple way to use the storage adapters through the [StorageManager](src/Storage/StorageManager.php) class.

Storage adapters are an unified interface that allow you to store file data to your local file system, in memory, in a database or into a zip file and remote systems. There is a database table keeping track of what you stored where. You can always write your own adapter or extend and overload existing ones.

How it works
------------

[](#how-it-works)

The whole plugin is build with clear [Separation of Concerns (SoC)](https://en.wikipedia.org/wiki/Separation_of_concerns) in mind: A file is *always* an entry in the `file_storage` table from the app perspective. The table is the *reference* to the real place of where the file is stored and keeps some meta information like mime type, filename, file hash (optional) and size as well. Storing the path to a file inside an arbitrary table along other data is considered as *bad practice* because it doesn't respect SoC from an architecture perspective but many people do it this way for some reason.

You associate the `file_storage` table with your model using the FileStorage or ImageStorage model from the plugin via hasOne, hasMany or HABTM. When you upload a file you save it to the FileStorage model through the associations, `Documents.file` for example. The FileStorage model dispatches then file storage specific events, the listeners listening to these events process the file and put it in the configured storage backend using adapters for different backends and build the storage path using a path builder class.

List of supported Adapters
--------------------------

[](#list-of-supported-adapters)

- Apc
- Amazon S3
- ACL Aware Amazon S3
- Azure
- Doctrine DBAL
- Dropbox
- Ftp
- Grid FS
- In Memory
- Local File System
- MogileFS
- Open Cloud
- Rackspace Cloudfiles
- Sftp
- Zip File

Supported CakePHP Versions
--------------------------

[](#supported-cakephp-versions)

- CakePHP 4.x -&gt; 3.0 Branch
- CakePHP 3.x -&gt; 2.0 Branch
- CakePHP 2.x -&gt; 1.0 Branch

Requirements
------------

[](#requirements)

- PHP 7.2+
- CakePHP 4.x
- Gaufrette Storage Library 0.7.x

Optional but required if you want image processing out of the box:

- The [Imagine Image processing plugin](https://github.com/burzum/cakephp-imagine-plugin) if you want to process and store images.
- [FlySystem](https://github.com/thephpleague/flysystem) as alternative library over Gaufrette

You can still implement whatever file processing you want very easy. It's not tied to Imagine.

Documentation
-------------

[](#documentation)

For documentation, as well as tutorials, see the [docs](docs/README.md) directory of this repository.

Support
-------

[](#support)

For bugs and feature requests, please use the [issues](https://github.com/burzum/cakephp-file-storage/issues) section of this repository.

Contributing
------------

[](#contributing)

To contribute to this plugin please follow a few basic rules.

- Pull requests must be send to the branch that reflects the version you want to contribute to.
- [Unit tests](http://book.cakephp.org/4.0/en/development/testing.html) are required.

License
-------

[](#license)

Copyright Florian Krämer

Licensed under The MIT License Redistributions of files must retain the above copyright notice.

###  Health Score

46

—

FairBetter than 93% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity50

Moderate usage in the ecosystem

Community32

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~72 days

Recently: every ~148 days

Total

38

Last Release

2002d ago

Major Versions

1.2.1 → 2.0.0-beta12017-11-24

1.2.x-dev → 2.0.0-beta22018-09-06

2.1.0 → 3.0.0-beta2019-07-23

2.0.x-dev → 3.0.x-dev2020-08-11

3.0.x-dev → 4.0.x-dev2020-11-24

PHP version history (5 changes)0.3.2PHP &gt;=5.3.2

1.0.0-RC1PHP &gt;=5.4.19

2.0.0-beta2PHP &gt;=7.0.0

3.0.0-betaPHP &gt;=7.2.0

4.0.x-devPHP &gt;=7.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/0643e6255da841fe65260ec6e263d8908a40a84b884c32e9fc6be6a15e252fa8?d=identicon)[burzum](/maintainers/burzum)

---

Top Contributors

[![burzum](https://avatars.githubusercontent.com/u/162789?v=4)](https://github.com/burzum "burzum (113 commits)")[![robertpustulka](https://avatars.githubusercontent.com/u/7437773?v=4)](https://github.com/robertpustulka "robertpustulka (67 commits)")[![ravage84](https://avatars.githubusercontent.com/u/625761?v=4)](https://github.com/ravage84 "ravage84 (55 commits)")[![dereuromark](https://avatars.githubusercontent.com/u/39854?v=4)](https://github.com/dereuromark "dereuromark (14 commits)")[![skie](https://avatars.githubusercontent.com/u/130799?v=4)](https://github.com/skie "skie (14 commits)")[![mcallisto](https://avatars.githubusercontent.com/u/122379?v=4)](https://github.com/mcallisto "mcallisto (9 commits)")[![steinkel](https://avatars.githubusercontent.com/u/151761?v=4)](https://github.com/steinkel "steinkel (8 commits)")[![Adnan0703](https://avatars.githubusercontent.com/u/6469288?v=4)](https://github.com/Adnan0703 "Adnan0703 (7 commits)")[![choma](https://avatars.githubusercontent.com/u/4775453?v=4)](https://github.com/choma "choma (6 commits)")[![j15e](https://avatars.githubusercontent.com/u/143380?v=4)](https://github.com/j15e "j15e (5 commits)")[![scrutinizer-auto-fixer](https://avatars.githubusercontent.com/u/6253494?v=4)](https://github.com/scrutinizer-auto-fixer "scrutinizer-auto-fixer (5 commits)")[![curtisgibby](https://avatars.githubusercontent.com/u/1086964?v=4)](https://github.com/curtisgibby "curtisgibby (4 commits)")[![bfncs](https://avatars.githubusercontent.com/u/1049882?v=4)](https://github.com/bfncs "bfncs (3 commits)")[![rifer](https://avatars.githubusercontent.com/u/13977524?v=4)](https://github.com/rifer "rifer (2 commits)")[![ajibarra](https://avatars.githubusercontent.com/u/794722?v=4)](https://github.com/ajibarra "ajibarra (2 commits)")[![andrej-griniuk](https://avatars.githubusercontent.com/u/2722793?v=4)](https://github.com/andrej-griniuk "andrej-griniuk (2 commits)")[![stonelasley](https://avatars.githubusercontent.com/u/1717836?v=4)](https://github.com/stonelasley "stonelasley (2 commits)")[![BionicPimp](https://avatars.githubusercontent.com/u/2127533?v=4)](https://github.com/BionicPimp "BionicPimp (2 commits)")[![mhimmer](https://avatars.githubusercontent.com/u/199251?v=4)](https://github.com/mhimmer "mhimmer (2 commits)")[![stripthis](https://avatars.githubusercontent.com/u/77410?v=4)](https://github.com/stripthis "stripthis (2 commits)")

---

Tags

cakephpdropboxftpphps3storagestorage-adapterstorage-backenduploaduploaderfilesystemabstractioncakephpfilestoragemediaupload

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/burzum-file-storage/health.svg)

```
[![Health](https://phpackages.com/badges/burzum-file-storage/health.svg)](https://phpackages.com/packages/burzum-file-storage)
```

###  Alternatives

[knplabs/gaufrette

PHP library that provides a filesystem abstraction layer

2.5k39.8M123](/packages/knplabs-gaufrette)[knplabs/knp-gaufrette-bundle

Allows to easily use the Gaufrette library in a Symfony project

72428.6M91](/packages/knplabs-knp-gaufrette-bundle)[dereuromark/cakephp-file-storage

This plugin is giving you the possibility to store files in virtually any kind of storage backend. This plugin is wrapping the Gaufrette library (https://github.com/KnpLabs/Gaufrette) library in a CakePHP fashion and provides a simple way to use the storage adapters through the StorageManager class.

104.1k](/packages/dereuromark-cakephp-file-storage)[sonata-project/media-bundle

Symfony SonataMediaBundle

4625.5M71](/packages/sonata-project-media-bundle)[torann/mediasort

Attachment manager for Laravel.

2012.5k](/packages/torann-mediasort)[burriko/cake-file-storage

A basic file storage behavior for CakePHP. Handles storing uploaded files in database or file system.

101.1k](/packages/burriko-cake-file-storage)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
