mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-06 22:30:56 +03:00
portable mode: add flags for s3 upload part size and concurrency
This commit is contained in:
@@ -37,6 +37,8 @@ var (
|
|||||||
portableS3Endpoint string
|
portableS3Endpoint string
|
||||||
portableS3StorageClass string
|
portableS3StorageClass string
|
||||||
portableS3KeyPrefix string
|
portableS3KeyPrefix string
|
||||||
|
portableS3ULPartSize int
|
||||||
|
portableS3ULConcurrency int
|
||||||
portableGCSBucket string
|
portableGCSBucket string
|
||||||
portableGCSCredentialsFile string
|
portableGCSCredentialsFile string
|
||||||
portableGCSAutoCredentials int
|
portableGCSAutoCredentials int
|
||||||
@@ -108,6 +110,8 @@ Please take a look at the usage below to customize the serving parameters`,
|
|||||||
Endpoint: portableS3Endpoint,
|
Endpoint: portableS3Endpoint,
|
||||||
StorageClass: portableS3StorageClass,
|
StorageClass: portableS3StorageClass,
|
||||||
KeyPrefix: portableS3KeyPrefix,
|
KeyPrefix: portableS3KeyPrefix,
|
||||||
|
UploadPartSize: int64(portableS3ULPartSize),
|
||||||
|
UploadConcurrency: portableS3ULConcurrency,
|
||||||
},
|
},
|
||||||
GCSConfig: vfs.GCSFsConfig{
|
GCSConfig: vfs.GCSFsConfig{
|
||||||
Bucket: portableGCSBucket,
|
Bucket: portableGCSBucket,
|
||||||
@@ -160,6 +164,8 @@ func init() {
|
|||||||
portableCmd.Flags().StringVar(&portableS3StorageClass, "s3-storage-class", "", "")
|
portableCmd.Flags().StringVar(&portableS3StorageClass, "s3-storage-class", "", "")
|
||||||
portableCmd.Flags().StringVar(&portableS3KeyPrefix, "s3-key-prefix", "", "Allows to restrict access to the virtual folder "+
|
portableCmd.Flags().StringVar(&portableS3KeyPrefix, "s3-key-prefix", "", "Allows to restrict access to the virtual folder "+
|
||||||
"identified by this prefix and its contents")
|
"identified by this prefix and its contents")
|
||||||
|
portableCmd.Flags().IntVar(&portableS3ULPartSize, "s3-upload-part-size", 5, "The buffer size for multipart uploads (MB)")
|
||||||
|
portableCmd.Flags().IntVar(&portableS3ULConcurrency, "s3-upload-concurrency", 2, "How many parts are uploaded in parallel")
|
||||||
portableCmd.Flags().StringVar(&portableGCSBucket, "gcs-bucket", "", "")
|
portableCmd.Flags().StringVar(&portableGCSBucket, "gcs-bucket", "", "")
|
||||||
portableCmd.Flags().StringVar(&portableGCSStorageClass, "gcs-storage-class", "", "")
|
portableCmd.Flags().StringVar(&portableGCSStorageClass, "gcs-storage-class", "", "")
|
||||||
portableCmd.Flags().StringVar(&portableGCSKeyPrefix, "gcs-key-prefix", "", "Allows to restrict access to the virtual folder "+
|
portableCmd.Flags().StringVar(&portableGCSKeyPrefix, "gcs-key-prefix", "", "Allows to restrict access to the virtual folder "+
|
||||||
|
|||||||
@@ -37,10 +37,11 @@ Flags:
|
|||||||
--s3-key-prefix string Allows to restrict access to the virtual folder identified by this prefix and its contents
|
--s3-key-prefix string Allows to restrict access to the virtual folder identified by this prefix and its contents
|
||||||
--s3-region string
|
--s3-region string
|
||||||
--s3-storage-class string
|
--s3-storage-class string
|
||||||
|
--s3-upload-concurrency int How many parts are uploaded in parallel (default 2)
|
||||||
|
--s3-upload-part-size int The buffer size for multipart uploads (MB) (default 5)
|
||||||
-s, --sftpd-port int 0 means a random non privileged port
|
-s, --sftpd-port int 0 means a random non privileged port
|
||||||
-c, --ssh-commands strings SSH commands to enable. "*" means any supported SSH command including scp (default [md5sum,sha1sum,cd,pwd])
|
-c, --ssh-commands strings SSH commands to enable. "*" means any supported SSH command including scp (default [md5sum,sha1sum,cd,pwd])
|
||||||
-u, --username string Leave empty to use an auto generated value
|
-u, --username string Leave empty to use an auto generated value
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
In portable mode, SFTPGo can advertise the SFTP service and, optionally, the credentials via multicast DNS, so there is a standard way to discover the service and to automatically connect to it.
|
In portable mode, SFTPGo can advertise the SFTP service and, optionally, the credentials via multicast DNS, so there is a standard way to discover the service and to automatically connect to it.
|
||||||
|
|||||||
Reference in New Issue
Block a user