Recommend this page to a friend! |
Classes of Alexandre Sinício | PHP Cloud Storage Abstraction | README.md | Download |
|
DownloadAbstract StorageStoring and retrieving files with PHP is easy... right? Yes, it is, until you find out that you were storing files in your local server and now needs to change that to Amazon S3, Google or whatever. You hard-coded a lot of stuff in your code, and when you start to "rewire" stuff, everything starts to break. It hurts. The objective of this repo is to create an interface for file storage. This allow us to separate the implementation for each storage provider and the actual code which just want to store/retrieve/delete a file. The basic implementation for local storage and Amazon S3 are included. Feel free to contribute, criticize, extend and use. TerminologySome storage providers use different terminology for stuff. It can lead to confusion, and there's no way around it except choosing what seems the "best fit" for everything. We use the term DependenciesThe interface itself does not have any dependencies. However the Amazon S3 implementation does. I suggest to use Composer and get the "aws/aws-sdk-php" package. Everything should be there. ExamplesBasic general examples
|