Skip to content

Conversation

gabrieljenik
Copy link
Contributor

Added initialize method for initiliazing S3 from a config file.

Usage:
$this->load->library('s3');
$this->s3 = new s3();
$this->s3->initialize($config); // Config can be a custom array. If null, config will be taken from config file.

Sample config file: (to be placed under config/s3.php)

    <?php
    /*
    | -------------------------------------------------------------------
    | Amazon S3 Configuration
    | -------------------------------------------------------------------
    */

    $config["accessKey"] = "AKIAJHFQ7V53XXI5CYTA";
    $config["secretKey"] = "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";
    $config["useSSL"] = FALSE;
    $config["endpoint"] = 's3.amazonaws.com';

Added initialize method for initiliazing S3 from a config file.

Usage:
			$this->load->library('s3');
			$this->s3 = new s3();
			$this->s3->initialize($config);			

Sample config file: (to be placed under config/s3.php)

		<?php
		/*
		| -------------------------------------------------------------------
		| Amazon S3 Configuration
		| -------------------------------------------------------------------
		*/
		
		$config["accessKey"] = "AKIAJHFQ7V53XXI5CYTA";
		$config["secretKey"] = "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";
		$config["useSSL"] = FALSE;
		$config["endpoint"] = 's3.amazonaws.com';
@gabrieljenik gabrieljenik changed the title Update S3.php Added initialize method for initiliazing S3 from a config file Oct 24, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant