mirror of
https://github.com/halejohn/Cloudreve.git
synced 2026-01-26 09:34:57 +08:00
Modify: re-organize structure of filesystem
This commit is contained in:
@@ -73,12 +73,15 @@ func GenericAfterUpload(ctx context.Context, fs *FileSystem) error {
|
||||
}
|
||||
|
||||
// 向数据库中插入记录
|
||||
_, err := fs.AddFile(ctx, &folder)
|
||||
file, err := fs.AddFile(ctx, &folder)
|
||||
if err != nil {
|
||||
return errors.New("无法插入文件记录")
|
||||
}
|
||||
|
||||
// TODO 是否需要立即获取图像大小?
|
||||
|
||||
// 异步尝试生成缩略图
|
||||
go fs.GenerateThumbnail(ctx, file)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user