Download the PHP package pixelfusion/silverstripe-s3 without Composer

On this page you can find all versions of the php package pixelfusion/silverstripe-s3. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package silverstripe-s3

silverstripe-s3

SilverStripe module to store assets in S3 rather than on the local filesystem.

Note: This module does not currently implement any kind of bucket policy for protected assets. It is up to you to implement this yourself using AWS bucket policy.

Installation

Run this

Environment setup

The module requires a few environment variables to be set. Full details can be seen in the SilverStripeS3AdapterTrait trait. These are mandatory.

If running outside of an EC2 instance it will be necessary to specify an API key and secret.

Example YML Config when running outside of EC2:

Example YML Config when running CDN for S3:

Make sure that you have the CDN URL under alternate domain names in your cloudfront distribution and the the A record for it has been set up pointing to your distribution.

Make sure your alternate domain name has an SSL certificate.

Installation

This will install the most recent applicable version of the module given your other Composer requirements.

Note: This currently immediately replaces the built-in local asset store that comes with SilverStripe with one based on S3. Any files that had previously been uploaded to an existing asset store will be unavailable (though they won't be lost - just run composer remove silverstripe/s3 to remove the module and restore access).

Configuration

Assets are classed as either 'public' or 'protected' by SilverStripe. Public assets can be freely downloaded, whereas protected assets (e.g. assets not yet published) shouldn't be directly accessed.

The module supports this by streaming the contents of protected files down to the browser via the web server (as opposed to linking to S3 directly) by default. To ensure that protected assets can't be accessed, ensure you setup an appropriate bucket policy (see below for an untested example).

Configuring S3

The 'protected' S3 asset store should be protected using standard AWS IAM policies that disallow all access to anonymous users, but still allow the action s3:GetObject for both public and protected files. Protected files will be streamed from AWS, so they do not need to be accessed by users directly. Therefore, something similar to the following bucket policy may be useful.

Make sure you replace <bucket-name> below with the appropriate values.

Note: The below policy has not been extensively tested - feedback welcome.

For developers

Read Setting up a local sandbox for developing the Silverstripe S3 module if you wish to do some local development.

Uninstalling


All versions of silverstripe-s3 with dependencies

PHP Build Version
Package Version
Requires silverstripe/framework Version ^4.0.0
league/flysystem-aws-s3-v3 Version ^1.0.29
silverstripe/vendor-plugin Version ^1.0
league/flysystem-cached-adapter Version ^1.1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package pixelfusion/silverstripe-s3 contains the following files

Loading the files please wait ....