ciims-plugins/awsuploader

AWS S3 Uploader plugin for CiiMS

1.0.3 2015-03-28 18:56 UTC

This package is not auto-updated.

Last update: 2024-11-09 18:16:55 UTC


README

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