Skip to content

a-ganguly/CodeIgniter-S3

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Amazon S3 Library for CodeIgniter

Easily integrate your CI applications to Amazon’s Simple Storage Solution with this library.

This library is (hardly) a port of Donovan Schönknecht’s S3 PHP Class.

Setup

  1. Edit config/s3.php with your appropriate settings
  2. Copy config and library files to your CI installation

Class Methods

For more detailed information about the required parameters and returns check the S3.php file.

Objects:

  • copyObject
  • deleteObject
  • getObject
  • getObjectInfo
  • inputFile
  • inputResource
  • putObject
  • getAuthenticatedURL

Buckets:

  • listBuckets
  • getBucket
  • putBucket
  • deleteBucket
  • getBucketLocation
  • getBucketLogging
  • setBucketLogging
  • disableBucketLogging
  • getHttpUploadPostParams

Access Control Policies:

  • getAccessControlPolicy
  • setAccessControlPolicy

CloudFront:

  • listDistributions
  • createDistribution
  • getDistribution
  • updateDistribution
  • deleteDistribution

Legacy methods:

  • putObjectFile
  • putObjectString

Example Usage


  // Load Library
  $this->load->library('s3');
  
  // Create a Bucket
  var_dump($this->s3->putBucket('My-Bucket', $this->s3->ACL_PUBLIC_READ));
  
  // List Buckets
  var_dump($this->s3->listBuckets());

References

About

Amazon S3 Library for CodeIgniter

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%