Some drive service changes

This commit is contained in:
2025-07-27 12:03:41 +08:00
parent 05284760a7
commit e7e6c258e2
3 changed files with 42 additions and 36 deletions

View File

@@ -35,6 +35,7 @@ public class FileController(
var file = await fs.GetFileAsync(id);
if (file is null) return NotFound();
if (file.IsMarkedRecycle) return StatusCode(StatusCodes.Status410Gone, "The file has been recycled.");
if (!string.IsNullOrWhiteSpace(file.StorageUrl)) return Redirect(file.StorageUrl);
@@ -149,7 +150,7 @@ public class FileController(
.AsQueryable();
if (pool.HasValue) query = query.Where(e => e.PoolId == pool);
var total = await query.CountAsync();
Response.Headers.Append("X-Total", total.ToString());