Download the PHP package skullyframework/skully-amazon-s3 without Composer
On this page you can find all versions of the php package skullyframework/skully-amazon-s3. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download skullyframework/skully-amazon-s3
More information about skullyframework/skully-amazon-s3
Files in skullyframework/skully-amazon-s3
Package skully-amazon-s3
Short Description Amazon S3 Integration with Skully Framework. Can be used with Skully Admin.
License MIT
Informations about the package skully-amazon-s3
skully-amazon-s3
Skully Framework integration with Amazon S3. Features:
- Conversion of all important public urls to their respective Amazon S3 paths.
- If you have Skully Admin installed - Automatically send all uploaded images to your S3 repository after they resize completed.
- Console application to git manage your public directory in Amazon.
Main Module
The main module allows your app to convert all public urls into amazon S3 repository paths, and send images uploaded in admin to your S3 repository.
Installation of main module
Include this into your composer:
Then do composer update.
Update your Application and Config classes by use-ing S3ApplicationTrait and S3ConfigTrait in them. Follow the code from /vendor/skullyframework/skully-amazon-s3/Tests/app/TestApp on how to do this.
Usage of main module
Add the following code to your config file (yourapp/config/config.common.php or yourapp/config/config.unique.php):
Use your Amazon credentials in your app:
Copy the directory yourapp/vendor/skully-amazon-s3/Tests/app/config/AmazonS3 and add the following to your yourapp/.gitignore file:
Login to your Amazon S3 account, then download your access credentials. It is usually named credentials.csv. Copy this file to yourapp/config/amazonS3 directory so it can be used by your config file.
And in your Skully Admin controllers, change them to extend from SkullyAwsS3\Controllers\ImageUploader\ImageUploaderCRUD or SkullyAwsS3\Controllers\ImageUploader\ImageUploaderSetting or SkullyAwsS3\Controllers\ImageUploader\ImageUploader instead. To see this, see example code at /vendor/skully-amazon-s3/Tests/app/TestApp/Controllers/Admin/CRUDImagesController.php.
Done!
At this stage both feature #1 and #2 mentioned earlier should have implemented within your app.
Console Application
You can actually start working with Amazon S3 now by manually sending all your files in public directory to your Amazon S3 repository, except for public/[template]/App directory. If you need a better workflow, though (and you should!), you can install the Console Application for this module, which basically allows you to treat your Amazon S3 repository as Git repository.
You could then simply do ./console skully:s3 sync to synchronise the files to your server.
This console app uses s3cmd application, so you may also use any of its commands by calling ./console skully:s3 "s3cmd [arguments]".
s3cmd references:
- Simple commands: http://s3tools.org/s3cmd-howto
- Advanced commands: http://s3tools.org/s3cmd-sync
Installation of console application
S3cmd used by this module requires Python 2.6 (or newer). S3cmd is not compatible with Python 3.x.
Usage of console application
Simply run this command to synchronise with server:
Example
There is a sample application in Tests/TestApp/app. To set this up (do the following in your terminal):
- Clone this repository into your web server .
- Create a database named
skully_adminandskully_admin_test. - Browse to the test app .
- Run db migration .
- Browse to your app
All versions of skully-amazon-s3 with dependencies
symfony/console Version 2.5.2
skullyframework/skully Version 0.1.*
aws/aws-sdk-php Version 2.6.*
skullyframework/skully-admin Version 0.1.*