title: Image to HttpPostedFileBase - or a way to store an Image file in server filesystem
body: <p>I have a WCF RESTful service that has the purpose of receiving a base64-encoded string that represents an image and store it in the server filesystem, in a manner similar to how a HttpPostedFile does it with the following code (file is a HttpPostedFileBase variable):</p>
  
  <pre><code>file.SaveAs(Server.MapPath("..\\Content\\UploadedImages\\") + id + file.FileName.Replace(" ",""));
  </code></pre>
  
  <p>So far, I can create an System.Drawing.Image object from the base64 string without any problems. However, I can't seem to create a HttpPostedFileBase variable that can take this image and invoke the method put in the code brackets?</p>
  
  <p>Is there any way I can do it? According to <a href="https://stackoverflow.com/questions/4896640/net-load-file-to-httppostedfilebase">this page</a>, I can't, so the real question would be:</p>
  
  <p>How can I save an System.Drawing.Image file in the filesystem of my server, so I can just keep a reference to the file in the database? Is it even possible?</p>
  
  <p>Thanks in advance for your time! :D</p>