ARUN VARRIAR
ARUN VARRIAR

Reputation: 1

Upload attachments to Azure devops

I am trying to get an attachemnt using GET https://dev.azure.com/org/_apis/wit/attachments/9532fc2b?api-version=5.1 using c# using http client. I am getting the response something like this "PK\u0003\u...".

After getting this response i want to upload it back to another organisation in ADO. I don't want to download it.Using the GET and POST I need to do this. When I am doing POST using httpclient, it says successfull and created. But if click on the url a file with avague name is downloaded and I am not able to open it.

Upvotes: 0

Views: 742

Answers (1)

LoLance
LoLance

Reputation: 28086

To upload attachment, we need to upload attachment to attachment store first and then attach the attachment to specific work item. (I think you may lack the first step)

And the file to be uploaded should be binary file, see similar ticket here.

Upvotes: 1

Related Questions