开发者

How do I post a file over HTTP via public API in ASP NET?

开发者 https://www.devze.com 2022-12-15 21:57 出处:网络
I have a web application. I am using C#. I have existing methods in my API for various things but a开发者_如何学运维ll only submit and return bool/int/strings.

I have a web application. I am using C#. I have existing methods in my API for various things but a开发者_如何学运维ll only submit and return bool/int/strings.

All of my API methods have the directive

System.ServiceModel.OperationContract

All the parameters are of

System.Runtime.Serialization.DataMember

I would like to be able to receive a posted file over HTTP. Apologies if this is a very simple question, but I'm not sure where to start so I don't know what to google. All I've been finding is people attempting to save a HttpPostedFile after submitting it in a form.

Thanks in advance for any help.

EDIT: this will be called from an iPhone application. Not via the browser on the iPhone

Basically, I would like to do this: http://www.flickr.com/services/api/upload.api.html


Your question is somewhat confusing. But if you are asking how to receive a file via HTTP in an ASP.NET web app... the answer is the FileUpload control. It doesn't really matter what browser (iPhone) the client is using.


Are you submitting the file via a web application or a desktop app?

0

精彩评论

暂无评论...
验证码 换一张
取 消