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.DataMemberI 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.htmlYour 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?
精彩评论