-
Notifications
You must be signed in to change notification settings - Fork 10.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement the Mvc PushFileStreamResult API #58161
base: main
Are you sure you want to change the base?
Conversation
Thanks for your PR, @0xced. Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
a1440b9
to
944b437
Compare
Looks like this PR hasn't been active for some time and the codebase could have been changed in the meantime. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for taking the time to work on this, @0xced!
This looks good overall. To make sure that everything's checked, can you open a new API proposal issue specifically for the MVC-related changes? I'm hoping the review can happen fairly quickly since they build on top of the IResult-based implementations but I'd like to make sure we get the right scrutiny for the new methods on ControllerBase
.
} | ||
} | ||
|
||
[LoggerMessage(1, LogLevel.Information, "Executing {FileResultType}, sending file with download name '{FileDownloadName}' ...", EventName = "ExecutingFileResultWithNoFileName", SkipEnabledCheck = true)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why SkipEnabledCheck = true
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because ExecutingFileResultWithNoFileName
is already surrounded by if (logger.IsEnabled(LogLevel.Information))
inside the ExecutingFileResult
method, exactly like in FileContentResultExecutor
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 5 out of 7 changed files in this pull request and generated no comments.
Files not reviewed (2)
- src/Mvc/Mvc.Core/src/PublicAPI.Unshipped.txt: Language not supported
- src/Mvc/Mvc.Core/test/PushFileStreamResultTest.cs: Evaluated as low risk
Comments suppressed due to low confidence (1)
src/Mvc/Mvc.Core/src/Infrastructure/PushFileStreamResultExecutor.cs:64
- The 'WriteFileAsync' method should handle the 'range' and 'rangeLength' parameters correctly, ensuring they are 'null' and '0' respectively, or handle them appropriately if they are not.
Debug.Assert(range == null);
Please don't close this pull request. |
Mvc PushFileStreamResult API
Description
This pull request implements
PushFileStreamResult
as described in #39383 along with the relatedFile
overloads on theControllerBase
class and thePushFileStreamResultExecutor
.Fixes #39383