CodeIgniter AWS S3 Integration Library Free Download
CodeIgniter AWS S3 Integration is a CodeIgniter Library which provides an easy way to integrate AWS S3 in a CodeIgniter project.
Using this library you can use the S3(Simple Storage Service by Amazon) Bucket as a storage for user uploaded files in your Codeigniter project. It was never easy to use S3 as a storage media for your Codeigniter Project before this library, It will hardly take 5 minutes in integration. It will simply save you several hours of time for the integration.
Note: In order to use S3 as a storage you do not need to host your project on AWS. You can use S3 service from any hosting server, even from your local Server too.
Looking forward to use S3 in your existing CodeIgniter system to scale with low cost storage?
If yes than It’s easiest way to achieve that!
- Installation wizard helps you to setup AWS configuration very easily.
- Use of single function to use S3 as Storage instead of web-server for uploaded files.
- Use of single function to manually upload any web-server file from web-server to an S3 bucket.
- Use of the original AWS SDK library to connect with the S3 service.
- Copy a S3 file from one Bucket to anoher or in same Bucket.
- Create a S3 Bucket in AWS account.
See how easy it is to use, with sample codes.
Using do_upload_s3() function, the uploaded file will store on same relative location in an S3 Bucket instead of web-server.
//Normal code to upload a file on web-server $this->upload->do_upload(); //Change to $this->upload->do_upload_s3();
Using s3_site_url() function, File will be referenced from same relative location from S3 Bucket instead of web-server.
//Normal code to refer a file on web-server <a href="<?php echo site_url("uploads/myphoto.jpg"); ?>">Download</a> //Change to <a href="<?php echo s3_site_url("uploads/myphoto.jpg"); ?>">Download</a>
Upload a file manually from the web-server to an S3 bucket
//Upload myphoto.jpg file to S3 Bucket. $this->upload->do_upload_manually('user_photos/','myphoto.jpg','user_photos/');
Copy a S3 file from one Bucket to another or in same Bucket
//Copy S3 File $this->cisssintegration_lib->copy_s3_file($source,$destination);
To create a S3 Bucket in your AWS account
//Create a S3 Bucket $flag = $this->cisssintegration_lib->create_bucket("mybucketname");
I am willing to help and provide support you through any problems you may have, or and features/suggestions that you want to implement. Just send me an email or leave a comment.
13 Nov, 2013: What’s new
# Delete a File from S3 Bucket.
# Copy a File from one Bucket to another or in same Bucket.
# Create a S3 Bucket in AWS account.
# File can be upload on root of S3 Bucket without any folder.
# Maintaied upload file mime type so Images do not get download when viewing on AWS URL.
# Better quality and maintained code, did changes in structure slightly for improvement. It will be easy to understand.
Note: AWS/S3 and Codeigniter are the Trademarks of their respective owners.