title: Could I upload a file through a web service?
body: <p>I want my customers to upload some file to my server. My current design is as below:</p>
  
  <ul>
  <li><p>I make a folder on my server with R/W permission to Anonymous user like this: <a href="http://myserver/uploads" rel="nofollow noreferrer">http://myserver/uploads</a></p></li>
  <li><p>Customer contact my web service to indicate they want to upload something, and the webservice returned a path like this:  <a href="http://myserver/uploads/xxx-xxx-xxx-xxx" rel="nofollow noreferrer">http://myserver/uploads/xxx-xxx-xxx-xxx</a>, the xxx part is a GUID.</p></li>
  </ul>
  
  <p>But I don't know what to do next? I believe customer has the permission to write to the virtual path returned by the web service, but how could I write my client-side code so that it can actually copy things to that virtual path? My client-side is a Win32 application, not a web page.</p>
  
  <p>What if I want the customer upload files within a web page, how to do that? I know that there's a "PUT" method in HTTP protocol that could be used to upload things to server, but how to use that?</p>
  
  <p>I am new to this kind of web development. I hope I made myself clear. If there's any better design, please let me know. </p>
  
  <p>Many many thanks.</p>
  
  <h2>Update - 1 - 0:59 2010/12/27</h2>
  
  <p>A similar question: <a href="https://stackoverflow.com/questions/51256/how-to-upload-a-file-to-a-wcf-service">How to upload a file to a WCF Service?</a></p>
  
  <p>Some possible solutions:</p>
  
  <p><a href="http://www.codeproject.com/KB/XML/ImageUploadWS.aspx" rel="nofollow noreferrer">Image Upload Web Service in C#.NET</a></p>
  
  <p><a href="http://www.c-sharpcorner.com/uploadfile/scottlysle/uploadwithcsharpws05032007121259pm/uploadwithcsharpws.aspx" rel="nofollow noreferrer">Upload any type of File through a C# Web Service</a></p>
  
  <p><a href="http://www.codeproject.com/KB/WCF/WCF_FileTransfer_Progress.aspx" rel="nofollow noreferrer">Progress Indication while Uploading/Downloading Files using WCF</a></p>