-
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
Conversation
a1440b9
to
944b437
Compare
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. |
Can I get a human to reopen this pull request please? |
@0xced Did you get a chance to file an API review issue for this? We'll need to get the API reviewed + approved before merging. |
@tdykstra please review |
I haven't got around yet but I'd like to do it. I just have other priorities right now. Can we please reopen this again? And maybe also tell the bot to stop closing this PR every week? This bot repeatedly closing pull requests is such hostile behaviour towards contributors. 😟 |
That's why the bot is closing it. Once you get an API review issue for this, and add |
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