Provide an API to configure the TempDirectory used by ASP.NET Core
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 281
Description
ASP.NET Core currently uses an environment variable to drive the temp directory, falling back `Path.GetTempPath()`. See https://github.com/aspnet/AspNetCore/blob/56e2080ef7741dea9a5c24a8e0639b0921be2d22/src/Http/Http/src/Internal/BufferingHelper.cs#L18-L39.
This path is currently in use by `FileBufferingReadStream` and as of https://github.com/aspnet/AspNetCore/pull/9015 change, by `FileBufferingWriteStream`.
This is one of the few parts of the stack that is only configurable via environment variable. We should instead follow the regular pattern of having an option type (that can be configured via configuration) and use those in when constructing these streams and everywhere else ASP.NET Core may need to write to the temp directory.
Contributor guide
Assessment
This issue has not been assessed yet.