feat: increased max img size
Signed-off-by: limited_dev <loginakkisativ@gmail.com>
This commit is contained in:
parent
24d70c6bcd
commit
ee9219b9ac
3 changed files with 3 additions and 3 deletions
|
@ -141,7 +141,7 @@
|
||||||
CommentData commentToCreate;
|
CommentData commentToCreate;
|
||||||
if (hasImage)
|
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 file = Path.GetRandomFileName() + "." + selectedFile.Name.Split(".")[selectedFile.Name.Split(".").Length - 1];
|
||||||
var path = $"{env.WebRootPath}/img/dynamic/comment/{@post.Board}/{@file}";
|
var path = $"{env.WebRootPath}/img/dynamic/comment/{@post.Board}/{@file}";
|
||||||
FileStream fs = File.Create(path);
|
FileStream fs = File.Create(path);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<div class="notesInfo">
|
<div class="notesInfo">
|
||||||
<span>The max. image size is 2MiB.</span>
|
<span>The max. image size is 4MiB.</span>
|
||||||
<br/>
|
<br/>
|
||||||
<span>Supported file types are: jpeg, png & gif</span>
|
<span>Supported file types are: jpeg, png & gif</span>
|
||||||
<br/>
|
<br/>
|
||||||
|
|
|
@ -145,7 +145,7 @@
|
||||||
return;
|
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 file = Path.GetRandomFileName() + "." + selectedFile.Name.Split(".")[selectedFile.Name.Split(".").Length - 1];
|
||||||
var path = $"{env.WebRootPath}/img/dynamic/op/{@board.Tag}/{@file}";
|
var path = $"{env.WebRootPath}/img/dynamic/op/{@board.Tag}/{@file}";
|
||||||
FileStream fs = File.Create(path);
|
FileStream fs = File.Create(path);
|
||||||
|
|
Loading…
Reference in a new issue