title: ADO: upload an attachment to Azure DevOps via HTTP REST request
body: <p>We're using ADO Server 2019 and as part of a larger project I need to upload some emails to the ADO environment to attach to work items. I've already figured out that you first need to upload the attachment, pass over the attachment ID to the work item patch request and add the relationship from the work item end however what I can't for the life of me figure out is where to pick the actual email or any item up to upload.</p>
  <p>The example that's given within the MS docs shows you how to post an upload but it uploads nothing, it just creates a blank page.</p>
  <pre>
  POST https://{instance}/fabrikam/_apis/wit/attachments?fileName=textAsFileAttachment.txt&api-version=5.0
  </pre>
  <p>A body for the request needs to be built to define where the attachment is from what I can gather however there isn't any kind of documentation around this for simply posting it via HTTP.</p>
  <p>We're using Blue Prism so using C# is an option but not ideal.</p>
  <p>Thanks in advance.</p>