feat: fix file name length problem (#1534)

This commit is contained in:
wht
2023-02-10 20:27:20 +08:00
committed by GitHub
parent 04567babf8
commit 9558bb4167
2 changed files with 21 additions and 0 deletions

View File

@ -180,6 +180,7 @@ func (c *ApiController) UploadResource() {
fileType, _ = util.GetOwnerAndNameFromId(mimeType)
}
fullFilePath = object.GetTruncatedPath(provider, fullFilePath, 175)
if tag != "avatar" && tag != "termsOfUse" {
ext := filepath.Ext(filepath.Base(fullFilePath))
index := len(fullFilePath) - len(ext)