Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/caferrari/caffilestorage

ZF2 File Storage Module
https://github.com/caferrari/caffilestorage

Last synced: about 2 months ago
JSON representation

ZF2 File Storage Module

Awesome Lists containing this project

README

        

# ZF2 File Storage Module

This module helps you to store and retrieve files based on namespaces/id

Saving Base64 encoded images
----------------------------

In the module.config.php:
```php
array(
'namespaces' => array(
'my_nice_namespace' => array(
'driver' => 'filesystem',
'options' => array(
'directory' => getcwd() . '/data/images',
'subdivide' => true,
'files_per_folder' => 1000
)
)
)
),
//....
);
```

Usage in the controller:
```php
getServiceLocator()->get('filestorage')
->setNamespace('my_nice_namespace')
->addBase64Image($id, $base64Data)
->save();

//...
}

}
```