From f9f72e925351224e77453fc44b0b493e61a1a69d Mon Sep 17 00:00:00 2001 From: Anna Zabolotskaya Date: Tue, 9 Apr 2024 10:41:06 +0200 Subject: [PATCH] use universal file name --- FunctionApp/UploadDocumentToLoxo.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/FunctionApp/UploadDocumentToLoxo.cs b/FunctionApp/UploadDocumentToLoxo.cs index 1bc6856..bf93132 100644 --- a/FunctionApp/UploadDocumentToLoxo.cs +++ b/FunctionApp/UploadDocumentToLoxo.cs @@ -61,8 +61,7 @@ public async Task Run( { var fileContent = new ByteArrayContent(fileData); fileContent.Headers.ContentType = new MediaTypeHeaderValue("application/octet-stream"); - var filename = Path.GetFileName(new Uri(fileUrl).LocalPath); - content.Add(fileContent, "document", filename); + content.Add(fileContent, "document", $"Filled in form ({DateTime.Now}).pdf"); var postResponse = await httpClient.PostAsync( $"https://app.loxo.co/api/{_settings.AgencySlug}/people/{personId}/documents", content);