Update 20260130
This commit is contained in:
@@ -120,19 +120,10 @@ ELSE
|
||||
FileName = $"{dto.Key}.pdf"
|
||||
};
|
||||
response.Content.Headers.ContentLength = pdfBytes.Length;
|
||||
if (System.IO.File.Exists(@"x:\file.pdf")) { System.IO.File.Delete(@"x:\file.pdf"); }
|
||||
System.IO.FileStream stream =
|
||||
|
||||
new FileStream(@"x:\file.pdf", FileMode.CreateNew);
|
||||
System.IO.BinaryWriter writer =
|
||||
new BinaryWriter(stream);
|
||||
writer.Write(pdfBytes, 0, pdfBytes.Length);
|
||||
writer.Close();
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private async Task<byte[]> CallExternalPdfApi(string json)
|
||||
{
|
||||
@@ -148,6 +139,7 @@ ELSE
|
||||
var data = Encoding.UTF8.GetBytes(jsonstring);
|
||||
string OwnHost = System.Configuration.ConfigurationManager.AppSettings["OwnHost"].ToString();
|
||||
string uri = OwnHost + "/API/CreateCLM";
|
||||
uri = OwnHost + "/API/DokumentGenerator";
|
||||
request = WebRequest.Create(uri);
|
||||
request.ContentLength = data.Length;
|
||||
request.ContentType = "application/json";
|
||||
|
||||
Reference in New Issue
Block a user