-
Notifications
You must be signed in to change notification settings - Fork 191
Considerations for Multipart support off of HttpRequest #965
Comments
Are you planning to move to existing API? My high order bit would be to avoid synchronous APIs that donthr IO. That’s one mistake we made with the Form API. Can you propose an API shape and the usage pattern you’d expect? That will help determine if this makes sense to make a first class API |
I'm not sure at this point about moving APIs. I'm assuming you are referring to Here's a concept API shape
Using it:
|
This isn't much of an improvement over HttpRequest.Form.File collection. Rather than adding another buffered collection that you can't even index, let's work to expose the unbuffered consumption pattern in a more first class way. This can be done with with new extension methods in Http.Extensions that call the existing WebUtilities APIs. That way you don't have to move anything around or create any new types. Let's start with this sample: I'm not worried about the nested multipart yet, though a similar approach could be applied. |
Hm @Tratcher... Extension method would be nice. I was going for consistency. I'm not a fan of extension methods as properties. Where would the |
It can be cached in HttpContext.Features |
This issue was moved to dotnet/aspnetcore#2682 |
I'm experimenting with adding Multipart support to
HttpRequest
. It will be done similarly to how forms are handled, using the same patterns andMultipartReader
. The end goal is to allow MVC and Web API to define models as multipart.I'm hoping for some feedback on the direction.
MultipartSection
be handled? ShouldMicrosoft.AspnetCore.Http.Abstractions
define its ownMultipartSection
? Or should we move it fromMicrosoft.AspnetCore.WebUtilities
? There seems to be no clear reference graph for this.MultipartValues
which would work likeStringValues
?MultipartSectionCollection
be able to looked up by key and as a list? Not all parts have names.Thoughts?
The text was updated successfully, but these errors were encountered: