Convert Base64 data into file and save it on a web server using ASP.NET Web API
<p>I have Base64 audio file which i am passing through ajax to a Web API 2 controller.</p>

<p>I want to convert it into a file and I have to save that file in a folder on a web server. I am using a HostGator windows server but I am unable to convert it to a file and save it on the web server.
I need help.</p>

<pre><code>var dataModel={ Base64file:base6
               Filename:filename   }
$.ajax({
    type: "POST",
    dataType: "json",
    url: baseUrl + 'api/data/Details',
    data: dataModel,
    success: function (data) {
        alert(data);

    },
    error: function (error) {
        jsonValue = jQuery.parseJSON(error.responseText);
    }

  //WEBAPI Controller where i am passing ajax data
   public IHTTPActionResult Details(Details dataModel)
    {
       string Path="";
        string sPath1 =System.Web.Hosting.HostingEnvironment.MapPath("http://xxxxx.com/Folder"); 
       }
</code></pre>