No Country for Big Files Hosting

Months ago, I've been asked a solution to publish tons of files to tons of users, each able to access only his own documents (it was about fiscal and burocratic documents monthly generated by a consultancy agency).

First option: extend their existing website to include a private area on which expose the contents. On Joomla!. Hosted on [1]. Despite the desperate context I spent whole days trying to hack an existing plugin offering similar kind of functionality, of course failing hard due lack of internal Joomla! API to access the most essential informations and overloading of the hosting resources once I loaded the (first) 3000+ users in the database.

Second option: store documents on AWS S3, and manage access to them through an ownCloud instance. Apparently a good plan, but ownCloud's performances on the remote folders were unacceptable (despite some dirty hack in internal caching) and the desired permissions hierarchy too complex to be correctly implemented with the provided users/groups management.

After many weeks on failing tentatives, slow feedback from the techical staff of the committant, and raising frustation, I gone for the most obvious solution: implement it by myself.

Leveraging the out-of-the-box interface to AWS S3 of Laravel and throwing the bican/roles package in the middle I reached the goal in a pair of part-time working days, adding even support for theming and configurable rules for automatic file assignment to users accordly to their filenames.

The result is published on GitHub, for all those in the same situation.

[1]: note for non-Italian readers: is one of the most shitty Italian web providers, but one of the most popular among unaware users wanting to publish their home-made website. Competing with Aruba on shit-ness.