add ATTACHMENT_SIZE_LIMIT, MAX_MESSAGE_SIZE, MAX_REACTION_SIZE & replace System.IO with custom Fs class
This commit is contained in:
parent
91f8dd0db5
commit
a17100910e
6 changed files with 99 additions and 48 deletions
|
|
@ -885,7 +885,7 @@ public static async Task Auth(HttpContext context, Func<Task> next, IQueryCollec
|
|||
return;
|
||||
}
|
||||
|
||||
byte[] fileBytes = await LarpixServer.Utils.Utils.LoadBodyBytes(context.Request.Body, 50 * 1024 * 1024); // 50MB limit for attachments
|
||||
byte[] fileBytes = await LoadBodyBytes(context.Request.Body, ATTACHMENT_SIZE_LIMIT); // attachment size limit
|
||||
if (fileBytes == null || fileBytes.Length == 0)
|
||||
{
|
||||
await context.Response.WriteAsync(Encryption.Encryption.EncryptString("error:empty.body", password));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue