mirror of
https://github.com/aliasvault/aliasvault.git
synced 2026-05-09 07:46:13 -04:00
Update vault attachment uploader to accept files up to 10MB (#1786)
This commit is contained in:
committed by
Leendert de Borst
parent
c8e1626967
commit
52ee530519
@@ -57,6 +57,11 @@
|
||||
/// </summary>
|
||||
private string StatusMessage { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Maximum individual attachment file size in bytes.
|
||||
/// </summary>
|
||||
private int MaxFileSize { get; set; } = 1024 * 1024 * 10; // 10 MB
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void OnInitialized()
|
||||
{
|
||||
@@ -74,7 +79,7 @@
|
||||
try
|
||||
{
|
||||
using var ms = new MemoryStream();
|
||||
await file.OpenReadStream().CopyToAsync(ms);
|
||||
await file.OpenReadStream(MaxFileSize).CopyToAsync(ms);
|
||||
|
||||
var attachment = new Attachment
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user