mirror of
https://github.com/halejohn/Cloudreve.git
synced 2026-01-26 09:34:57 +08:00
Modify: parameters in headers should be URIEncoded
This commit is contained in:
@@ -15,6 +15,7 @@ type Group struct {
|
||||
WebDAVEnabled bool
|
||||
Aria2Option string
|
||||
Color string
|
||||
SpeedLimit int
|
||||
|
||||
// 数据库忽略字段
|
||||
PolicyList []uint `gorm:"-"`
|
||||
|
||||
@@ -38,7 +38,6 @@ type PolicyOption struct {
|
||||
OPPassword string `json:"op_pwd"`
|
||||
FileType []string `json:"file_type"`
|
||||
MimeType string `json:"mimetype"`
|
||||
SpeedLimit int `json:"speed_limit"`
|
||||
RangeTransferEnabled bool `json:"range_transfer_enabled"`
|
||||
}
|
||||
|
||||
@@ -53,6 +52,9 @@ func GetPolicyByID(ID interface{}) (Policy, error) {
|
||||
func (policy *Policy) AfterFind() (err error) {
|
||||
// 解析上传策略设置到OptionsSerialized
|
||||
err = json.Unmarshal([]byte(policy.Options), &policy.OptionsSerialized)
|
||||
if policy.OptionsSerialized.FileType == nil {
|
||||
policy.OptionsSerialized.FileType = []string{}
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user