MultipartFormDataStreamProvider vs HttpContext.Current

后端 未结 1 817
梦毁少年i
梦毁少年i 2021-02-18 13:30

I am struggling to understand why would I want to use MultipartFormDataStreamProvider when I can get all the information using HttpContext.Current.

It is much easier to

相关标签:
1条回答
  • 2021-02-18 13:40

    This is what I found on MSDN. I think this might help you.

    The stream provider looks at the Content-Disposition header field and determines an output Stream based on the presence of a filename parameter. If a filename parameter is present in the Content-Disposition header field then the body part is written to a FileStream, otherwise it is written to a MemoryStream. This makes it convenient to process MIME Multipart HTML Form data which is a combination of form data and file content.

    0 讨论(0)
提交回复
热议问题