PowerShell Invoke-RestMethod: Uploading new Attachment to Jira ticket

Figured post the code I edited to get it to work based on the link I posted above.

function Upload-JiraCSV($jiraTicket, $filepath)
{
    $wc = new-object System.Net.WebClient
    $wc.Headers.Add("Authorization", $headers.Authorization)
    $wc.Headers.Add("X-Atlassian-Token", "nocheck") 
    $wc.UploadFile("$URIPath/issue/$jiraTicket/attachments", $filepath)
}