PHPackages                             xi/filelib - 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. xi/filelib

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

xi/filelib
==========

File library for PHP

v0.16.0(7y ago)2254.5k8[29 issues](https://github.com/xi-project/xi-filelib/issues)[2 PRs](https://github.com/xi-project/xi-filelib/pulls)2BSD-3-ClausePHPPHP &gt;=7.1.0CI failing

Since Aug 15Pushed 7y ago3 watchersCompare

[ Source](https://github.com/xi-project/xi-filelib)[ Packagist](https://packagist.org/packages/xi/filelib)[ Docs](http://github.com/xi-project/xi-filelib)[ RSS](/packages/xi-filelib/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (24)Versions (55)Used By (2)

Xi Filelib
==========

[](#xi-filelib)

[![Build Status](https://camo.githubusercontent.com/4a100cca768452678edf3dc98a443060389d955fbc8cd04d1dccf07c6742da17/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f78692d70726f6a6563742f78692d66696c656c69622e706e673f6272616e63683d6d6173746572)](http://travis-ci.org/xi-project/xi-filelib)

Filelib is a file library component for PHP, providing a virtual filesystem for your web application's files. It can be used to manage both your application's internal and user-uploaded files in many ways. What it (at least for now) is NOT is a place to store your assets like css, js and similar.

Let's face it: practically all web apps have to store documents, media and such and the needs are same. Filelib takes care of all the hard and/or repetetive tasks and abstracts away and reveals all the related changeable components as loosely coupled subsystems:

- Storing of metadata (virtual folders / files) in a data storage (database, usually).
- Safe physical storage of files in a filesystem (local, S3, Gridfs, etc).
- Authorization (who can do what in the virtual filesystem) and publication (to make them fast-readable and with pretty urls) of world readable files.
- Rendering the files to HTTP response (sometimes you can't world-publish everything but it's still gotta be decent).
- Mime types and extensions and all this horrible stuff
- Versioning (meaning creation of different representations of a master file, thumbnails, html5 videos etc)
- Asynchronous processing (you can't keep the end user waiting for that video to be encoded, you know)
- And there's probably more!

Filelib is fully extensible via plugins and hooks. In fact, many of the "core" functionality is provided via plugins (authorization, automatic publishing, file versions) so the core is kept elegant and maintainable.

Filelib is based on my own observations, opinions and experience formed while developing many file- and mediabanks for the last 10 years. It has evolved and keeps evolving with real projects and use cases, so thanks for all past and present early adopters!

Project Status
--------------

[](#project-status)

(2018-08) I've kinda moved on years ago. Not coding much with PHP anymore. Doing React and stuff with JS nowadays. It's a shame, because Filebanksta was soooo close to be "finished". It remains useable, though. I just upgraded all packages to modern versions. I'll try to do it again a couple times a year, at least. Cheers!

Hard requirements
-----------------

[](#hard-requirements)

- A client software that needs file management
- PHP 7.1

Soft requirements (for harder use)
----------------------------------

[](#soft-requirements-for-harder-use)

- A serious data storage (MySQL/MariaDB, PostgreSQL, MongoDB supported out of the box)
- Imagemagick for image processing
- Zencoder for all your video needs
- Intl for transliterating / slugifying
- A queue (RabbitMQ, IronMQ, SQS) for asynchronous operations

Quickstart
----------

[](#quickstart)

### Using JSON storage (for simple testing only)

[](#using-json-storage-for-simple-testing-only)

```
