Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions core/lexicon/en/source.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
$_lang['prop_s3.url_desc'] = 'The URL of the Amazon S3 instance.';
$_lang['s3_no_move_folder'] = 'The S3 driver does not support moving of folders at this time.';
$_lang['prop_s3.region_desc'] = 'Region of the bucket. Example: us-west-1';
$_lang['prop_s3.hostname_desc'] = 'Custom hostname to connect to the bucket';

/* file type */
$_lang['PNG'] = 'PNG';
Expand Down
13 changes: 13 additions & 0 deletions core/model/modx/sources/mods3mediasource.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ public function initialize() {
$this->driver->set_region($region);
}

$hostname = $this->xpdo->getOption('hostname',$properties,'');
if (!empty($hostname)) {
$this->driver->set_hostname($hostname);
}

$this->setBucket($this->xpdo->getOption('bucket',$properties,''));

return $return;
Expand Down Expand Up @@ -1205,6 +1210,14 @@ public function getDefaultProperties() {
'value' => '',
'lexicon' => 'core:source',
),
'hostname' => array(
'name' => 'hostname',
'desc' => 'prop_s3.hostname_desc',
'type' => 'textfield',
'options' => '',
'value' => '',
'lexicon' => 'core:source',
),
);
}

Expand Down
Loading