Skip to content

Add file results documentation for Minimal APIs and controllers#37257

Merged
wadepickett merged 5 commits into
mainfrom
mdk/file-results
Jun 19, 2026
Merged

Add file results documentation for Minimal APIs and controllers#37257
wadepickett merged 5 commits into
mainfrom
mdk/file-results

Conversation

@mikekistler

@mikekistler mikekistler commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Adds documentation for file result return values in ASP.NET Core, covering both Minimal APIs and controller-based APIs.

What's included

  • File result typesTypedResults.File / ControllerBase.File() with byte[] and Stream
  • OpenAPI support — Using Produces<Stream> for binary, Produces<string> for text
  • Conditional requests — ETag and Last-Modified with 304 Not Modified
  • Range requestsenableRangeProcessing for partial content (206) responses

Code examples reference snippets in dotnet/AspNetCore.Docs.Samples (PR: dotnet/AspNetCore.Docs.Samples#312).


Internal previews

📄 File 🔗 Preview link
aspnetcore/fundamentals/minimal-apis/responses.md How to create responses in Minimal API apps

Comment thread aspnetcore/fundamentals/minimal-apis/responses.md Outdated
Comment thread aspnetcore/fundamentals/minimal-apis/responses.md Outdated
Comment thread aspnetcore/fundamentals/minimal-apis/responses.md Outdated
Comment thread aspnetcore/fundamentals/minimal-apis/responses.md Outdated
Comment thread aspnetcore/fundamentals/minimal-apis/responses.md Outdated
Comment thread aspnetcore/fundamentals/minimal-apis/responses.md Outdated
Comment thread aspnetcore/fundamentals/minimal-apis/responses.md Outdated
Comment thread aspnetcore/fundamentals/minimal-apis/responses.md Outdated
@wadepickett

wadepickett commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Great content. I found a few minor items, with suggestions inline.

@wadepickett wadepickett left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a build issue warning of missing code:
The article references code snippets at "~/../AspNetCore.Docs.Samples/fundamentals/minimal-apis/FileResults/10.x/

This will be resolved when the following PR is merged:
dotnet/AspNetCore.Docs.Samples#312

Comment thread aspnetcore/fundamentals/minimal-apis/responses.md Outdated
mikekistler and others added 2 commits June 16, 2026 07:44
Co-authored-by: Wade Pickett <wpickett@microsoft.com>

@wadepickett wadepickett left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a build issue warning of missing code:
The article references code snippets at "~/../AspNetCore.Docs.Samples/fundamentals/minimal-apis/FileResults/10.x/

@wadepickett

Copy link
Copy Markdown
Contributor

Closing and reopening to force new buld, now that samples on aspnetcore.docs.samples it links to from R dotnet/AspNetCore.Docs.Samples#312 has merged.

@wadepickett wadepickett reopened this Jun 19, 2026

@wadepickett wadepickett left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mikekistler: Approved. Merging..

@wadepickett wadepickett merged commit 00c4dca into main Jun 19, 2026
4 of 5 checks passed
@wadepickett wadepickett deleted the mdk/file-results branch June 19, 2026 01:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants