diff --git a/src/Umbraco.Web.BackOffice/Controllers/MediaController.cs b/src/Umbraco.Web.BackOffice/Controllers/MediaController.cs index db47ba599f6e..f8e28989b123 100644 --- a/src/Umbraco.Web.BackOffice/Controllers/MediaController.cs +++ b/src/Umbraco.Web.BackOffice/Controllers/MediaController.cs @@ -788,8 +788,7 @@ public async Task PostAddFile([FromForm] string path, [FromForm] continue; } - using var stream = new MemoryStream(); - await formFile.CopyToAsync(stream); + await using var stream = formFile.OpenReadStream(); if (_fileStreamSecurityValidator != null && _fileStreamSecurityValidator.IsConsideredSafe(stream) == false) { tempFiles.Notifications.Add(new BackOfficeNotification(