Error in my below code
My requirement is i want to upload the pdf file and save in separate folder Upload fileSecond section is to call API (In that API auto bookmark code is available)
Third section is to save autobookmark pdf in folder Upload file.
i have writeen below code is as follows
if (ModelState.IsValid)
{ //iterating through multiple file collection
foreach (HttpPostedFileBase file in files)
{
//Checking file is available to save.
if (file != null)
{
var InputFileName = Path.GetFileName(file.FileName);
var ServerSavePath = Path.Combine(Server.MapPath("~/UploadedFiles/") + InputFileName);
//Save file to server folder
file.SaveAs(ServerSavePath);
//assigning file uploaded status to ViewBag for showing message to user.
ViewBag.UploadStatus = files.Count().ToString() + " files uploaded successfully.";
var response = new HttpResponseMessage();
using (HttpClient httpClient = new HttpClient())
{
httpClient.BaseAddress = new Uri(https://ca-usa.paradatec-cloud.com/api/);
response = httpClient.PostAsync(@"api/job/GetTestPDF", new StringContent(string.Empty)).Result;
}
var whatisThis = response.Content.ReadAsStringAsync().Result;
return new FileContentResult(Convert.FromBase64String(response.Content.ReadAsStringAsync().Result), "application/pdf");
}
}
}
return View();
i have get below error in below line as follows
httpClient.BaseAddress = new Uri(@https://ca.pardate-cloud.com/api//);
the best overload for uri does not have a parameter named https
please let me know how to solve the above error