finish trash

This commit is contained in:
2024-06-10 16:47:20 +02:00
parent 9629a04da6
commit 4b70edb947
7 changed files with 178 additions and 97 deletions

View File

@@ -116,10 +116,10 @@ export class File {
originalPath: this.getBasePath(),
},
});
const trashName = plugins.smartunique.uuid4();
const trash = await this.parentDirectoryRef.bucketRef.getTrash();
await this.move({
directory: await this.parentDirectoryRef.bucketRef.getBaseDirectory(),
path: plugins.path.join('trash', trashName),
directory: await trash.getTrashDir(),
path: await trash.getTrashKeyByOriginalBasePath(this.getBasePath()),
});
}