Does anyone know, or better yet have an example, of a WCF service that will accept a form post encoded multipart/form-data ie. a file upload from a web page?
I have come up empty on google.
Ta, Ant
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
So, here goes…
Create your service contract which an operation which accepts a stream for its only parameter, decorate with WebInvoke as below
Create the class…
And the config, to accept streamed data, and the maximum size
Also in the System.Web increase the amount of data allowed in System.Web
This is just the basics, but allows for the addition of a Progress method to show an ajax progress bar and you may want to add some security.