Unable to publish azure webjob using powershell

I’m trying to publish webjob through powershell.

I followed below article

I have used script in Azure Release Def with Azure Powershell task.

I’m getting below error while running the script.

“Missing Content-Disposition header.”

at below script

Invoke-RestMethod -Uri $apiUrl -Headers $Header -Method put -InFile "<Complete path of the file>\<filename>.zip" -ContentType 'application/zip'

I’m already including Content-Disposition in the Header as below, but still getting error.

$Header = @{
'Content-Disposition'='attachment; attachment; filename=Copy.zip'
'Authorization'=$accessToken
}

How to resolve it.

Chandra,
when you crosspost the same question at the same time to different forums you should at least post links to the other forums along with your question to avoid people willing to you help making their work twice or more.

https://stackoverflow.com/questions/63703624/unable-to-publish-azure-webjob-using-powershell

Thanks