Skip to content

Instantly share code, notes, and snippets.

@andrewklau
Created November 17, 2016 00:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrewklau/78dddf113947767adb475ca4ad31aea6 to your computer and use it in GitHub Desktop.
Save andrewklau/78dddf113947767adb475ca4ad31aea6 to your computer and use it in GitHub Desktop.
<?php
/*
Plugin Name: S3 Endpoint Uploads
Plugin URI: https://www.newiteration.com/
Description: Add S3_UPLOADS_ENDPOINT_URL to S3-Uploads
Version: 1.0.0
Author: New Iteration
Author URI: https://www.newiteration.com/
License: MIT License
*/
add_filter('s3_uploads_s3_client_params', 's3_uploads_s3_client_params');
function s3_uploads_s3_client_params($params)
{
if (env('S3_UPLOADS_ENDPOINT_URL')) {
$params['endpoint'] = env('S3_UPLOADS_ENDPOINT_URL');
}
return $params;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment