mirror of
https://github.com/HaschekSolutions/pictshare.git
synced 2025-11-16 21:18:00 +00:00
@@ -41,6 +41,7 @@ _buildConfig() {
|
||||
echo "define('S3_ACCESS_KEY', '${S3_ACCESS_KEY:-}');"
|
||||
echo "define('S3_SECRET_KEY', '${S3_SECRET_KEY:-}');"
|
||||
echo "define('S3_ENDPOINT', '${S3_ENDPOINT:-}');"
|
||||
echo "define('S3_REGION', '${S3_REGION:-}');"
|
||||
echo "define('FTP_SERVER', '${FTP_SERVER:-}');"
|
||||
echo "define('FTP_PORT', ${FTP_PORT:-21});"
|
||||
echo "define('FTP_USER', '${FTP_USER:-}');"
|
||||
|
||||
@@ -67,6 +67,7 @@ You can also store all uploaded files on S3 or S3 compatible storage like [Minio
|
||||
|S3_ACCESS_KEY | string | Access key for your bucket|
|
||||
|S3_SECRET_KEY | string | Secret key for your bucket |
|
||||
|S3_ENDPOINT | URL | Server URL. If you're using S3 compatible software like [Minio](https://min.io/) you can enter the URL here |
|
||||
|S3_REGION | string | Region of your bucket |
|
||||
|
||||
### FTP
|
||||
|
||||
|
||||
@@ -57,6 +57,7 @@ Every other variable can be referenced against the [default PictShare configurat
|
||||
- S3_BUCKET (string | Name of your S3 bucket)
|
||||
- S3_ACCESS_KEY (string | Access Key for your Bucket)
|
||||
- S3_SECRET_KEY (string | Secrety Key)
|
||||
- S3_REGION (string | S3 bucket region)
|
||||
- S3_ENDPOINT (url | If you are using a selfhosted version of S3 like Minio, put your URL here)
|
||||
- ENCRYPTION_KEY (string | If you want to use encryption for storage controllers, put your encryption key here. [Read more](https://github.com/HaschekSolutions/pictshare/blob/master/rtfm/ENCRYPTION.md))
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ class S3Storage implements StorageController
|
||||
require_once(ROOT.DS.'storage-controllers'.DS.'s3'.DS.'aws-autoloader.php');
|
||||
$this->s3 = new Aws\S3\S3Client([
|
||||
'version' => 'latest',
|
||||
'region' => 'us-east-1',
|
||||
'region' => (is_defined('S3_REGION') && S3_REGION ?S3_REGION:'us-east-1'),
|
||||
'endpoint' => S3_ENDPOINT,
|
||||
'use_path_style_endpoint' => true,
|
||||
'credentials' => [
|
||||
|
||||
Reference in New Issue
Block a user