diff --git a/controllers/resource.go b/controllers/resource.go index f9cffee6..64bf0e01 100644 --- a/controllers/resource.go +++ b/controllers/resource.go @@ -257,7 +257,7 @@ func (c *ApiController) UploadResource() { fileType, _ = util.GetOwnerAndNameFromIdNoCheck(mimeType + "/") } - fullFilePath = object.GetTruncatedPath(provider, fullFilePath, 175) + fullFilePath = object.GetTruncatedPath(provider, fullFilePath, 450) if tag != "avatar" && tag != "termsOfUse" && !strings.HasPrefix(tag, "idCard") { ext := filepath.Ext(filepath.Base(fullFilePath)) index := len(fullFilePath) - len(ext) diff --git a/object/resource.go b/object/resource.go index 160fa110..ceba890c 100644 --- a/object/resource.go +++ b/object/resource.go @@ -36,7 +36,7 @@ type Resource struct { FileType string `xorm:"varchar(100)" json:"fileType"` FileFormat string `xorm:"varchar(100)" json:"fileFormat"` FileSize int `json:"fileSize"` - Url string `xorm:"varchar(255)" json:"url"` + Url string `xorm:"varchar(500)" json:"url"` Description string `xorm:"varchar(255)" json:"description"` }