Feature Request #49 : Custom Endpoint with S3-Based Uploading+

merge-requests/57/head
Moe 2019-03-07 15:57:01 -08:00
parent 8fe57162af
commit 9664e98fa6
2 changed files with 5 additions and 2 deletions

View File

@ -12,9 +12,9 @@
<div class="autosave_whcs_input autosave_whcs_1">
<div class="form-group">
<label><div><span><%-lang['Endpoint']%></span></div>
<div><select class="form-control" detail="use_whcs_size_limit" selector="h_whcs_endpoint">
<div><select class="form-control" detail="use_whcs_endpoint_select" selector="h_whcs_endpoint">
<option value=""><%- lang['Custom Endpoint'] %></option>
<option value="s3.wasabisys.com" selected>s3.wasabisys.com</option>
<option value="s3.wasabisys.com" selected><%- lang['Wasabi Hot Cloud Storage'] %></option>
</select></div>
</label>
</div>

View File

@ -44,6 +44,9 @@ module.exports = function(s,config,lang){
if(userDetails.whcs_dir !== ''){
userDetails.whcs_dir = s.checkCorrectPathEnding(userDetails.whcs_dir)
}
if(userDetails.use_whcs_endpoint_select && userDetails.use_whcs_endpoint_select !== ''){
userDetails.whcs_endpoint = userDetails.use_whcs_endpoint_select
}
if(!userDetails.whcs_endpoint || userDetails.whcs_endpoint === ''){
userDetails.whcs_endpoint = 's3.wasabisys.com'
}