From 6251767dcb582564e9fc934d6b3976393ce23dc7 Mon Sep 17 00:00:00 2001 From: wasbeer Date: Sat, 25 May 2024 15:31:47 +0200 Subject: [PATCH] Update Invoke-AzureStorageBlobUploadFinalize.ps1 Applied this fix: https://github.com/MSEndpointMgr/IntuneWin32App/issues/155#issuecomment-2109051761 --- Private/Invoke-AzureStorageBlobUploadFinalize.ps1 | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Private/Invoke-AzureStorageBlobUploadFinalize.ps1 b/Private/Invoke-AzureStorageBlobUploadFinalize.ps1 index 13d47ba..9e3722f 100644 --- a/Private/Invoke-AzureStorageBlobUploadFinalize.ps1 +++ b/Private/Invoke-AzureStorageBlobUploadFinalize.ps1 @@ -33,11 +33,14 @@ function Invoke-AzureStorageBlobUploadFinalize { $XML += "$($Chunk)" } $XML += '' - + + $Headers = @{ + "content-type" = "text/plain; charset=iso-8859-1" + } try { - $WebResponse = Invoke-RestMethod -Uri $Uri -Method "Put" -Body $XML -ErrorAction Stop + $WebResponse = Invoke-RestMethod -Uri $Uri -Method "Put" -Headers $Headers -Body $XML -ErrorAction Stop } catch { Write-Warning -Message "Failed to finalize Azure Storage blob upload. Error message: $($_.Exception.Message)" } -} \ No newline at end of file +}