'Uploading Attachment on Azure DevOps using Create Attachment WIT

I am working on this task in which I am supposed to take a file from the user, upload it on Azure DevOps, create Release pipeline, and then triggerthe release with the file upload on the DevOps. I have already written an Azure Function taking file from the user and creating release pipeline. Now, I am struggling to upload the received file to Azure DevOps. One idea is to use Create-Attachment API of Work Item Tracking but as I am new to this field, I am unsure about how to proceed. P.S. I am using Typescript programming language. Can anyone please help me?

Taking file from the user and I am trying to write an Azure Function which uploads the received file using Rest API on Azure DevOps.



Solution 1:[1]

If the file size is lessthan 130MB there is no problem to upload, but if the file size is more than 130MB then need to use chunked upload.

There are different methods to upload and handle the file. Check the link:

https://docs.microsoft.com/en-us/rest/api/azure/devops/wit/attachments/create?view=azure-devops-rest-6.0 which is explaining about different methods of uploads like chunked, binary and text file.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 SairamTadepalli-MT