mirror of
https://github.com/cloudreve/Cloudreve.git
synced 2026-11-17 22:58:07 +00:00
Feat: adapt major methods of WebDAV for Cloudreve file system
This commit is contained in:
1 parent
1dac66e632
commit
9fdf2fe7ab
10 files changed
+327
-258
No files matched your search
@@ -161,6 +161,9 @@ func GenericAfterUpdate(ctx context.Context, fs *FileSystem) error {
|
||||
if !ok {
|
||||
return ErrObjectNotExist
|
||||
}
|
||||
|
||||
fs.SetTargetFile(&[]model.File{originFile})
|
||||
|
||||
newFile, ok := ctx.Value(fsctx.FileHeaderCtx).(FileHeader)
|
||||
if !ok {
|
||||
return ErrObjectNotExist
|
||||
@@ -205,6 +208,7 @@ func GenericAfterUpload(ctx context.Context, fs *FileSystem) error {
|
||||
if err != nil {
|
||||
return ErrInsertFileRecord
|
||||
}
|
||||
fs.SetTargetFile(&[]model.File{*file})
|
||||
|
||||
// 异步尝试生成缩略图
|
||||
go fs.GenerateThumbnail(ctx, file)
|
||||
|
||||
Reference in new issue
Block a user