All Projects → andersundsehr → aus_driver_amazon_s3

andersundsehr / aus_driver_amazon_s3

Licence: LGPL-3.0 License
Provides a TYPO3 FAL driver for the Amazon Web Service S3

Programming Languages

PHP
23972 projects - #3 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to aus driver amazon s3

content defender
Define allowed or denied content element types in your backend layouts
Stars: ✭ 63 (+320%)
Mutual labels:  typo3, typo3-extension
typo3-secure-downloads
Secure your assets and data from unwanted download. Apply TYPO3 access rights to ALL file assets (PDFs, TGZs or JPGs etc. - configurable) - protect them from direct access.
Stars: ✭ 15 (+0%)
Mutual labels:  typo3, typo3-extension
TYPO3 Restler
restler (PHP REST-Framework) for TYPO3
Stars: ✭ 29 (+93.33%)
Mutual labels:  typo3, typo3-extension
luxletter
Newsletter system for TYPO3
Stars: ✭ 18 (+20%)
Mutual labels:  typo3, typo3-extension
form examples
TYPO3 extension. Ships several examples for the TYPO3 Form Framework, e.g. an upload form or a custom email template with personalized salutation. Includes translation examples (both global and specific).
Stars: ✭ 30 (+100%)
Mutual labels:  typo3, typo3-extension
randomdata
TYPO3 extensions to generate new random data or replace existing data with random data
Stars: ✭ 14 (-6.67%)
Mutual labels:  typo3, typo3-extension
backend debug
Debug support in TYPO3 backend
Stars: ✭ 20 (+33.33%)
Mutual labels:  typo3, typo3-extension
autoswitchtolistview
Auto switch to list view when a sysfolder is shown
Stars: ✭ 14 (-6.67%)
Mutual labels:  typo3, typo3-extension
in2publish core
in2publish Community Version
Stars: ✭ 38 (+153.33%)
Mutual labels:  typo3, typo3-extension
t3x-rte ckeditor image
Image support in CKEditor for the TYPO3 ecosystem
Stars: ✭ 43 (+186.67%)
Mutual labels:  typo3, typo3-extension
urlguard
TYPO3 extension urlguard. Allows to define what query parameters will be passed to newly created typolinks.
Stars: ✭ 16 (+6.67%)
Mutual labels:  typo3, typo3-extension
typo3v10 example sitepackage
Site package extension for TYPO3 10 feature demonstration
Stars: ✭ 13 (-13.33%)
Mutual labels:  typo3, typo3-extension
autoloader
⚙️ Best TYPO3 Swiss Army knife ever ⚙️
Stars: ✭ 22 (+46.67%)
Mutual labels:  typo3, typo3-extension
mask export
Export your mask elements as extension
Stars: ✭ 45 (+200%)
Mutual labels:  typo3, typo3-extension
fluid-components
Encapsulated frontend components with Fluid's ViewHelper syntax for TYPO3
Stars: ✭ 41 (+173.33%)
Mutual labels:  typo3, typo3-extension
restrictfe
TYPO3 extension restrictfe. Blocks access to frontend and allows to show it only to some defined exception's like if the request is from an authorized backend user, has specific IP, header etc.
Stars: ✭ 12 (-20%)
Mutual labels:  typo3, typo3-extension
schema
TYPO3 extension providing an API and view helpers for schema.org markup
Stars: ✭ 19 (+26.67%)
Mutual labels:  typo3, typo3-extension
AzureServicesForUnity
Accessing Azure services (App Service, Table Storage, CosmosDB with Table API, Event Hubs) from a Unity game
Stars: ✭ 52 (+246.67%)
Mutual labels:  storage
typo3-web2pdf
A TYPO3 extension for rendering content as PDF
Stars: ✭ 18 (+20%)
Mutual labels:  typo3-extension
arc gcs
Provides an Arc backend for Google Cloud Storage
Stars: ✭ 48 (+220%)
Mutual labels:  storage

Packagist Release Packagist Downloads GitHub License Travis Code Climate

TYPO3 Extension: Amazon AWS S3 FAL driver (CDN)

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 9.5 - 10.4

German blog post: TYPO3 CDN with Amazon S3

Issue tracking: GitHub: AWS S3 FAL Driver

Packagist: andersundsehr/aus-driver-amazon-s3

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 “AWS S3” driver to root page (pid = 0).
  2. Configure your file storage

Configuration

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:

  • dnsPrefetch Use DNS prefetching tag: If enabled, an HTML tag will be included which prefetchs the DNS of the current CDN
  • doNotLoadAmazonLib Don’t load Amazon AWS PHP SDK: If enabled, you have to include the SDK by yourself! (http://aws.amazon.com/de/sdk-for-php/)
  • enablePermissionsCheck Check S3 permissions for each file and folder. This is disabled by default because it is very slow (TYPO3 has to make an AWS request for each file)

Extend Extension

Initialize S3 Client

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']);
  }
}

Initialize public base URL

You can set the public base URL in the configuration of your driver (TYPO3 backend). But maybe you want to set this on an other place.

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

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

A hook class might look like this:

namespace Vendor\ExtensionName\Hooks;

class AmazonS3DriverHook {

  public function initializeBaseUrl(array &$params, $obj){
    $params['baseUrl'] = 'https://example.com';
  }
}

Cache Control Header

There is a default setting to set the cache control header's max age for all file types. If you want to use special cache headers, you can use this hook:

$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aus_driver_amazon_s3']['getCacheControl'][] = 'Vendor\ExtensionName\Hooks\AmazonS3DriverHook->getCacheControl';

You can modify the parameter "cacheControl" as you wish. Please Notice: AWS S3 set the cache header only once - while uploading / creating or copy the file.

More

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].