1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-30 23:52:50 -05:00

Fix bug #2317: add deletion date validation for file Sends (#2342)

Co-authored-by: cyprain-okeke <108260115+cyprain-okeke@users.noreply.github.com>
This commit is contained in:
Alena N
2022-12-13 20:30:01 +01:00
committed by GitHub
parent c6fbe8cc44
commit 456cc6773e
2 changed files with 28 additions and 1 deletions

View File

@ -205,6 +205,7 @@ public class SendsController : Controller
throw new BadRequestException($"Max file size is {SendService.MAX_FILE_SIZE_READABLE}.");
}
model.ValidateCreation();
var userId = _userService.GetProperUserId(User).Value;
var (send, data) = model.ToSend(userId, model.File.FileName, _sendService);
var uploadUrl = await _sendService.SaveFileSendAsync(send, data, model.FileLength.Value);