Fix: incorrect capacity unit for OSS traffic limit

This commit is contained in:
HFO4
2020-03-15 09:56:50 +08:00
parent 15074015b3
commit d1ca65461c
3 changed files with 10 additions and 2 deletions

View File

@@ -248,6 +248,9 @@ func (handler Driver) Source(
signOptions = append(signOptions, oss.ResponseContentDisposition("attachment; filename=\""+url.PathEscape(fileName)+"\""))
}
if speed > 0 {
// Byte 转换为 bit
speed *= 8
// OSS对速度值有范围限制
if speed < 819200 {
speed = 819200