public async Task<IHttpActionResult> Add(HttpRequestMessage request) { var root = HttpContext.Current.Server.MapPath("~/App_Data"); var provider = new MultipartFormDataStreamProvider(root); await Request.Content.ReadAsMultipartAsync(provider); var transactionId = Guid.NewGuid().ToString(); var filePaths = MoveFilesToTransactionFolder(provider, transactionId); var putDocumentParams = GetPutDocumentMetaDataFromProvider(provider); var dms = new OnBase("jturner", "jturner"); var documentId = dms.CreateDocument(putDocumentParams, filePaths); var uri = new Uri(Request.RequestUri, documentId); return Created(uri, documentId); }