feat: increased max img size

Signed-off-by: limited_dev <loginakkisativ@gmail.com>
This commit is contained in:
limited_dev 2023-06-08 23:32:57 +02:00
parent 24d70c6bcd
commit ee9219b9ac
3 changed files with 3 additions and 3 deletions

View file

@ -141,7 +141,7 @@
CommentData commentToCreate;
if (hasImage)
{
Stream stream = selectedFile.OpenReadStream(maxAllowedSize: 512000 * 4); // max 2MB
Stream stream = selectedFile.OpenReadStream(maxAllowedSize: 512000 * 8); // max 4MB
var file = Path.GetRandomFileName() + "." + selectedFile.Name.Split(".")[selectedFile.Name.Split(".").Length - 1];
var path = $"{env.WebRootPath}/img/dynamic/comment/{@post.Board}/{@file}";
FileStream fs = File.Create(path);

View file

@ -1,5 +1,5 @@
<div class="notesInfo">
<span>The max. image size is 2MiB.</span>
<span>The max. image size is 4MiB.</span>
<br/>
<span>Supported file types are: jpeg, png & gif</span>
<br/>

View file

@ -145,7 +145,7 @@
return;
}
Stream stream = selectedFile.OpenReadStream(maxAllowedSize: 512000 * 4); // max 2MB
Stream stream = selectedFile.OpenReadStream(maxAllowedSize: 512000 * 8); // max 4MB
var file = Path.GetRandomFileName() + "." + selectedFile.Name.Split(".")[selectedFile.Name.Split(".").Length - 1];
var path = $"{env.WebRootPath}/img/dynamic/op/{@board.Tag}/{@file}";
FileStream fs = File.Create(path);