mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-06 22:30:56 +03:00
add prefer_database_credentials configuration parameter
When true, users' Google Cloud Storage credentials will be written to the data provider instead of disk. Pre-existing credentials on disk will be used as a fallback Fixes #201
This commit is contained in:
committed by
Nicola Murino
parent
6a8039e76a
commit
db7e81e9d0
@@ -1,7 +1,6 @@
|
||||
package httpd
|
||||
|
||||
import (
|
||||
"encoding/base64"
|
||||
"errors"
|
||||
"fmt"
|
||||
"html/template"
|
||||
@@ -430,7 +429,7 @@ func getFsConfigFromUserPostFields(r *http.Request) (dataprovider.Filesystem, er
|
||||
}
|
||||
return fs, err
|
||||
}
|
||||
fs.GCSConfig.Credentials = base64.StdEncoding.EncodeToString(fileBytes)
|
||||
fs.GCSConfig.Credentials = fileBytes
|
||||
fs.GCSConfig.AutomaticCredentials = 0
|
||||
}
|
||||
return fs, nil
|
||||
|
||||
Reference in New Issue
Block a user