mirror of
https://github.com/Caraxi/mare.server.git
synced 2025-12-13 16:44:14 +01:00
add raw filesize to db
This commit is contained in:
parent
c2cc8e28f8
commit
efe7fe98f2
6 changed files with 812 additions and 3 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue