title: How do I handle multipart form data using ServiceStack?
body: <p>I am writing a service to process requests sent from the browser using mutlipart/formdata encoding of the files.</p>
  
  <p>I see that I can get access to the raw input stream by decorating my request DTO with the interface IRequiresRequestStream and providing a Property called RequestStream.  But doing this seems to mean that I can't get any request properties filled in, even those that are contained within the URL.  For example, I have my request's route set up as follows</p>
  
  <pre><code>[Route("/document/{Type}/{Id}", "GET,PUT,POST/DELETE")]
  public class UploadFileRequest : IReturn&lt;UploadFileResponse&gt;, IRequiresRequestStream
  {
      public long Id { get; set; }
      public string Type { get; set; }
  
      public Stream RequestStream { get; set; }
  }
  </code></pre>
  
  <p>When I send a PUT request to this service, I see that the RequestStream property is set as I would like it to be, but the Id and Type properties are null.  <a href="https://groups.google.com/forum/#!msg/servicestack/l9qFvZNbuT0/dwyRQKBhmlMJ" rel="nofollow">https://groups.google.com/forum/#!msg/servicestack/l9qFvZNbuT0/dwyRQKBhmlMJ</a> seems to indicate that this will occur.</p>
  
  <p>Is there any way to get at the route parameters and still access the request stream?  Even then it seems I'll need to handle parsing the form data, but hopefully I can find a library to do that easily.</p>