♻️ Changed the way to clean upload folder

This commit is contained in:
2025-07-27 13:44:21 +08:00
parent e1ebd44ea8
commit 52addc91df
5 changed files with 25 additions and 157 deletions

View File

@@ -170,7 +170,6 @@ public class FileService(
// await db.SaveChangesAsync();
// // Since the file content is a duplicate, we can delete the new upload and we are done.
// await stream.DisposeAsync();
// await store.DeleteFileAsync(file.Id, CancellationToken.None);
// return file;
// }
@@ -432,7 +431,6 @@ public class FileService(
}
finally
{
await store.DeleteFileAsync(fileId, CancellationToken.None);
await nfs._PurgeCacheAsync(fileId);
}
}