Not able to download image from JIRA to local using image url in c#


#1

I have used the below url to get information of particular issue

“https://domainName.atlassian.net/rest/api/latest/issue/” + issueId + “/”

In that info I am able to get attachments urls included in that issue
I have used below code to download that attachments to my local path.

webClient.DownloadFile(imageurl, localpath);

Able to download but the file getting corrupted

Please help me on this or else suggest me the way to download the image to my local path


#2

Could you please provide a more complete example of what you are trying to do? Cheers.

Also, what is the output of running the file command on the downloaded files?


#3

Below is the url of attachment I am getting from JIRA.

I have used ‘webClient.DownloadFile(imageurl, localpath);’ to download that attachment.
Attached the output file after downloading.