mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-06 14:20:55 +03:00
gcsfs: allow to customize upload part size/time
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -1513,6 +1513,14 @@ func getGCSConfig(r *http.Request) (vfs.GCSFsConfig, error) {
|
||||
config.StorageClass = strings.TrimSpace(r.Form.Get("gcs_storage_class"))
|
||||
config.ACL = strings.TrimSpace(r.Form.Get("gcs_acl"))
|
||||
config.KeyPrefix = r.Form.Get("gcs_key_prefix")
|
||||
uploadPartSize, err := strconv.ParseInt(r.Form.Get("gcs_upload_part_size"), 10, 64)
|
||||
if err == nil {
|
||||
config.UploadPartSize = uploadPartSize
|
||||
}
|
||||
uploadPartMaxTime, err := strconv.Atoi(r.Form.Get("gcs_upload_part_max_time"))
|
||||
if err == nil {
|
||||
config.UploadPartMaxTime = uploadPartMaxTime
|
||||
}
|
||||
autoCredentials := r.Form.Get("gcs_auto_credentials")
|
||||
if autoCredentials != "" {
|
||||
config.AutomaticCredentials = 1
|
||||
|
||||
Reference in New Issue
Block a user