Git Product home page Git Product logo

aus_driver_amazon_s3's Introduction

What does it do?

This is a driver for the file abstraction layer (FAL) to support Amazon AWS S3.

You can create a file storage which allows you to upload/download and link the files to an AWS S3 bucket. It also supports the TYPO3 CMS image rendering.

Requires TYPO3 6.2 - 8.x

German blog post: TYPO3 CDN with Amazon S3

Issue tracking: GitHub: Amazon S3 FAL Driver

Administrator Manual

Installation

  1. Install the TYPO3 extension via composer (recommended) or install the extension via TER (not recommended anymore).

Composer installation:

composer require andersundsehr/aus-driver-amazon-s3
  1. Add a new file storage with the "Amazon S3" driver to root page (pid = 0).
  2. Configure your file storage

Driver Configuration

Add the following configurations:

  • Bucket: The name of your AWS S3 bucket
  • Region: The region of your bucket (avoid dots in the bucket name)
  • Key and secret key of your AWS account (see security credentials -> access keys)
  • Public base url (optional): this is the public url of your bucket, if empty its default to "bucketname.s3.amazonaws.com"
  • Protocol: network protocol (https://, http:// or auto detection)

Hint: Amazon AWS S3 bucket configuration

Make sure that your AWS S3 bucket is accessible to public web users.

For example add the following default permissions to "Edit bucket policy":

Example permissions:

{
  "Version": "2008-10-17",
  "Statement": [
      {
          "Sid": "AddPerm",
          "Effect": "Allow",
          "Principal": "*",
          "Action": "s3:GetObject",
          "Resource": "arn:aws:s3:::bucketname/*"
      }
  ]
}

Extension Configuration

Edit in "Extension Manager" the following extension settings:

  • Use DNS prefetching tag: If enabled, a HTML tag will be included which prefetchs the DNS of the current CDN
  • Don't load Amazon AWS PHP SDK: If enabled, you have to include this files by yourself! (http://aws.amazon.com/de/sdk-for-php/)

Extend Extension

If you use your own Amazon AWS SDK, you may want to work with your own S3 client object.

So you have to use the following hook in your own ext_loaclconf.php:

$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aus_driver_amazon_s3']['initializeClient-preProcessing'][] = \Vendor\ExtensionName\Hooks\AmazonS3DriverHook::class . '->initializeClient';

A hook class might look like this:

namespace Vendor\ExtensionName\Hooks;

class AmazonS3DriverHook {

  public function initializeClient(array &$params, $obj){
    $params['s3Client'] = MyAwsFactory::getAwsS3Client($params['configuration']);
  }
}

If you wish other hooks - don't be shy: GitHub issue tracking: Amazon S3 FAL Driver

aus_driver_amazon_s3's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.