mirror of
https://github.com/halejohn/Cloudreve.git
synced 2026-03-12 20:06:52 +08:00
fix: use default chunk size if it is set as 0
This commit is contained in:
@@ -47,6 +47,10 @@ type MetaData struct {
|
||||
}
|
||||
|
||||
func NewDriver(policy *model.Policy) (*Driver, error) {
|
||||
if policy.OptionsSerialized.ChunkSize == 0 {
|
||||
policy.OptionsSerialized.ChunkSize = 25 << 20 // 25 MB
|
||||
}
|
||||
|
||||
driver := &Driver{
|
||||
Policy: policy,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user