Skip to content

Commit

Permalink
Increased max cover size
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidLazarescu committed Jul 11, 2023
1 parent 8684e97 commit e0adc4f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Presentation/Controllers/BookController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public async Task<ActionResult> AddBookBinaryData(Guid guid)
if (!isMultiPart)
{
var message = "The book binary data needs to be sent as multipart";
_logger.LogWarning(message);
return StatusCode(400, new CommonErrorDto(400, message, 0));
}

Expand Down Expand Up @@ -84,7 +85,7 @@ public async Task<ActionResult> GetBookBinaryData(Guid guid)

[HttpPost("cover/{guid:guid}")]
[DisableFormValueModelBinding]
[RequestSizeLimit(5242880)] // Allow max 5MB
[RequestSizeLimit(10482880)] // Allow max 10MB
public async Task<ActionResult> ChangeCover(Guid guid)
{
// Check if the cover was sent in the correct format
Expand All @@ -95,6 +96,7 @@ public async Task<ActionResult> ChangeCover(Guid guid)
if (!isMultiPart)
{
var message = "The book binary data needs to be sent as multipart";
_logger.LogWarning(message);
return StatusCode(400, new CommonErrorDto(400, message, 0));
}

Expand Down

0 comments on commit e0adc4f

Please sign in to comment.