简体   繁体   English

Asp.Net Web API-如何在不使用mutlipart的情况下在REST终结点中接受文件?

[英]Asp.Net Web API - How to accept a file in a REST endpoint without using mutlipart?

I am trying to write a REST endpoint using the ASP.NET Web API framework. 我正在尝试使用ASP.NET Web API框架编写REST端点。 The use case is that the endpoint should be able to accept a stream of a zipped file. 用例是端点应能够接受压缩文件流。

The solutions that I have seen so far all use multipart/form-data but I'm trying to see whether it is possible to be able to do so without using multi-part. 到目前为止,我所看到的解决方案都使用multipart / form-data,但是我试图查看是否可以不使用multi-part来做到这一点。

使用multipart / form-data设置作为指南: https : //tools.ietf.org/html/rfc2388 https://tools.ietf.org/html/rfc2046

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM