mirror of
https://github.com/halejohn/Cloudreve.git
synced 2026-01-26 09:34:57 +08:00
fix: use default chunk size if it is set as 0
This commit is contained in:
@@ -30,6 +30,10 @@ type Driver struct {
|
||||
}
|
||||
|
||||
func NewDriver(policy *model.Policy) *Driver {
|
||||
if policy.OptionsSerialized.ChunkSize == 0 {
|
||||
policy.OptionsSerialized.ChunkSize = 25 << 20 // 25 MB
|
||||
}
|
||||
|
||||
mac := qbox.NewMac(policy.AccessKey, policy.SecretKey)
|
||||
cfg := &storage.Config{UseHTTPS: true}
|
||||
return &Driver{
|
||||
|
||||
Reference in New Issue
Block a user