Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ public ActionResult CreateDocument()
stream.Position = 0;

//Download Word document in the browser.
return File(stream, "application/msword", "Sample.docx");
return File(stream, "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "Sample.docx");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ static void Main(string[] args)
//Read the response stream
var stream = new StreamReader(response.Payload);
JsonReader reader = new JsonTextReader(stream);
var serilizer = new JsonSerializer();
var responseText = serilizer.Deserialize(reader);
var serializer = new JsonSerializer();
var responseText = serializer.Deserialize(reader);

//Convert Base64String into Word document
byte[] bytes = Convert.FromBase64String(responseText.ToString());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ public ActionResult CreateWordDocument()
document.Save(stream, FormatType.Docx);

//Download Word document in the browser.
return File(stream, "application/msword", "Sample.docx");
return File(stream, "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "Sample.docx");
}
}
public IActionResult Privacy()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ static void Main(string[] args)
}
catch (Exception ex)
{
throw;
Console.WriteLine("Error: " + ex.Message);
}

//Launch the output Word document
Expand Down