You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: backend/internxt/internxt.go
+82-25Lines changed: 82 additions & 25 deletions
Original file line number
Diff line number
Diff line change
@@ -30,15 +30,21 @@ import (
30
30
"github.com/rclone/rclone/fs/hash"
31
31
"github.com/rclone/rclone/lib/dircache"
32
32
"github.com/rclone/rclone/lib/encoder"
33
+
"github.com/rclone/rclone/lib/multipart"
33
34
"github.com/rclone/rclone/lib/oauthutil"
34
35
"github.com/rclone/rclone/lib/pacer"
35
36
"github.com/rclone/rclone/lib/random"
36
37
)
37
38
38
39
const (
39
-
minSleep=10*time.Millisecond
40
-
maxSleep=2*time.Second
41
-
decayConstant=2// bigger for slower decay, exponential
40
+
minSleep=10*time.Millisecond
41
+
maxSleep=2*time.Second
42
+
decayConstant=2
43
+
maxUploadParts=10000
44
+
minChunkSize=fs.SizeSuffix(5*1024*1024)
45
+
minUploadCutoff=fs.SizeSuffix(100*1024*1024)
46
+
defaultUploadCutoff=fs.SizeSuffix(100*1024*1024)
47
+
maxUploadCutoff=fs.SizeSuffix(5*1024*1024*1024)
42
48
)
43
49
44
50
// shouldRetry determines if an error should be retried.
@@ -101,6 +107,21 @@ func init() {
101
107
Default: true,
102
108
Advanced: true,
103
109
Help: "Skip hash validation when downloading files.\n\nBy default, hash validation is disabled. Set this to false to enable validation.",
110
+
}, {
111
+
Name: "upload_concurrency",
112
+
Help: "Concurrency for multipart uploads.\n\nThis is the number of chunks of the same file that are uploaded concurrently.\n\nNote that each chunk is buffered in memory.",
113
+
Default: 4,
114
+
Advanced: true,
115
+
}, {
116
+
Name: "upload_cutoff",
117
+
Help: "Cutoff for switching to multipart upload.\n\nAny files larger than this will be uploaded in chunks of chunk_size.\nThe minimum is 100 MiB and the maximum is 5 GiB.",
118
+
Default: defaultUploadCutoff,
119
+
Advanced: true,
120
+
}, {
121
+
Name: "chunk_size",
122
+
Help: "Chunk size for multipart uploads.\n\nFiles larger than upload_cutoff will be uploaded in chunks of this size.\n\nMemory usage is approximately chunk_size * upload_concurrency.",
0 commit comments