使用Create Attacment Wit上载附件上载附件
我正在处理此任务,其中我应该从用户中获取文件,将其上传到Azure DevOps,创建Release Pipeline,然后在DevOps上使用文件上传触发释放。我已经写了一个Azure功能,从用户获取文件并创建Release Pipeline。现在,我正在努力将收到的文件上传到Azure DevOps。一个想法是使用工作项跟踪的创建连接API,但是由于我是该领域的新手,我不确定如何进行。 PS我正在使用打字稿编程语言。 有人可以帮我吗?
从用户那里获取文件,我正在尝试编写一个Azure函数,该功能使用Azure DevOps上的REST API上载了收到的文件。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果文件大小小于130MB则上传没有问题,但如果文件大小大于130MB则需要使用分块上传。
有不同的方法来上传和处理文件。检查链接:
https://learn.microsoft.com/en-us/rest/api/azure/devops/wit/attachments/create?view=azure-devops-rest-6.0
它解释了不同的上传方法,如分块、二进制和文本文件。
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://learn.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.