Skip to content
This repository has been archived by the owner on Sep 25, 2018. It is now read-only.

ciims/ciims-plugins-awsuploader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

CiiAWSUploader Class

This class enables CiiMS to upload files to Amazon S3, isntead of uploading files to the uploads directory

Installation

This class should be installed with composer. After installing/uploading CiiMS, run this class

# composer require ciims-plugins/awsuploader dev-master # DEV
composer require ciims-plugins/awsuploader 1.0.0 # Versioned

How to Use

To use this class, you need to make a configuration change to your protected/config/params.php file.

<?php return array(

	[...]
	'ciims_plugins' => array(
		'upload' => array(
			'class' => 'CiiAWSUploader',
			'options' => array(
				'bucket' => ''
				'AWS_ACCESS_KEY' => '',
				'AWS_SECRET_ACCESS_KEY' => '',
				'region' => '', // required; @see https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html
				'cdn_domain' => 'https://cdn.example.com' // set to NULL if not used, if set, no trailing slash
			)
		)
	)
	[...]
);

Options

The following options are available for this class:

AWS_ACCESS_KEY (required)

Your AWS Access Key

AWS_SECRET_ACCESS_KEY (required)

Your AWS Secret Key

bucket (required)

The bucket name

cdn_domain (optional)

If you have a custom domain infront of AWS, you can specify it here. CiiMS will use this domain for the CDN urls instead of the default AWS domain