fix: 解决上传文件夹权限没改的问题 (#5919)

pull/5933/head v1.10.13-lts
zhengkunwang 2024-07-23 17:52:30 +08:00 committed by GitHub
parent 1cf3a0143c
commit 001c896eed
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 0 deletions

View File

@ -356,6 +356,7 @@ func (b *BaseApi) UploadFiles(c *gin.Context) {
global.LOG.Error(e) global.LOG.Error(e)
continue continue
} }
_ = os.Chown(dstDir, uid, gid)
} }
tmpFilename := dstFilename + ".tmp" tmpFilename := dstFilename + ".tmp"
if err := c.SaveUploadedFile(file, tmpFilename); err != nil { if err := c.SaveUploadedFile(file, tmpFilename); err != nil {