-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Closed
Labels
old-area-web-frameworks-do-not-use*DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels*DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
using MapGet("/", () => Results.File("bigfile.bin")) causes huge amount of memory consumption, and multiple seconds of delay till the download starts.
In .net6, download started instantly and used up no memory.
Same Issue on Results.Stream
Bug with screenshots for comparison visible here:
Expected Behavior
Results.File and Results.Stream should directly stream the file download without loading it first into ram.
Steps To Reproduce
I created a repo here, needs a big file in wwwroot/1gb.bin
https://github.com/davepermen/ResultsFileBug
to create file quickly (on windows): open cmd in wwwroot and run "fsutil file createnew 1gb.bin 1073741824" but any file works.
switch project between net6 and net7 to see the effect.
Exceptions (if any)
No response
.NET Version
7.0.100
Anything else?
No response
oferze and madelsonSommerEngineering
Metadata
Metadata
Assignees
Labels
old-area-web-frameworks-do-not-use*DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels*DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels

