feat: make Resource.Url length to 500

This commit is contained in:
Yang Luo 2024-08-26 23:57:41 +08:00
parent 230a77e3e3
commit 62bb257c6d
2 changed files with 2 additions and 2 deletions

View File

@ -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)

View File

@ -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"`
}