add raw filesize to db

This commit is contained in:
Stanley Dimant
2024-09-04 16:53:05 +02:00
parent c2cc8e28f8
commit efe7fe98f2
6 changed files with 812 additions and 3 deletions

View File

@@ -232,7 +232,8 @@ public class ServerFilesController : ControllerBase
UploadDate = DateTime.UtcNow,
UploaderUID = MareUser,
Size = compressedFileStream.Length,
Uploaded = true
Uploaded = true,
RawSize = data.LongLength
}).ConfigureAwait(false);
await _mareDbContext.SaveChangesAsync().ConfigureAwait(false);
@@ -333,7 +334,8 @@ public class ServerFilesController : ControllerBase
UploadDate = DateTime.UtcNow,
UploaderUID = MareUser,
Size = compressedMungedStream.Length,
Uploaded = true
Uploaded = true,
RawSize = data.Length
}).ConfigureAwait(false);
await _mareDbContext.SaveChangesAsync().ConfigureAwait(false);
@@ -440,7 +442,8 @@ public class ServerFilesController : ControllerBase
UploadDate = DateTime.UtcNow,
UploaderUID = MareUser,
Size = compressedStream.Length,
Uploaded = true
Uploaded = true,
RawSize = rawFileStream.Length
}).ConfigureAwait(false);
await _mareDbContext.SaveChangesAsync().ConfigureAwait(false);