Feat: generate thumbnails for image file

This commit is contained in:
HFO4
2019-12-08 14:16:01 +08:00
parent a445da5286
commit 0932a10fed
7 changed files with 147 additions and 9 deletions

View File

@@ -138,3 +138,8 @@ func GetFilesByParentIDs(ids []uint, uid uint) ([]File, error) {
func (file *File) Rename(new string) error {
return DB.Model(&file).Update("name", new).Error
}
// UpdatePicInfo 更新文件的图像信息
func (file *File) UpdatePicInfo(value string) error {
return DB.Model(&file).Update("pic_info", value).Error
}