Reputation: 7117
In VSTS attachment can be uploaded for workitems. Those attachments are displayed in a seperate tab.
I found no way to reference those attachments from within the description of the workitems.
So how to do it?
Upvotes: 78
Views: 42435
Reputation: 184
You could inspect the attachment URL in Chrome Developer Tools, then copy the URL, the element will look like:
<div class="grid-cell-contents-container">
<span class="attachment-icon bowtie-icon bowtie-file-content"></span>
<a href="/link.filetype&download=true&api-version=5.0-preview.2" tabindex="-1">filename.filetype</a>
</div>
Then just remove the &api-version=5.0-preview.2
part at the end.
Upvotes: 10
Reputation: 15988
As a workaround, you may download an attachment from work item. Then you may copy a download link from your browser download page and use it on the description field.
Upvotes: 14
Reputation: 692
&download=true&api-version=5.0-preview.2
part at the endUpvotes: 41
Reputation: 29
It is now possible, maybe. Go to attachments, and click on list view:
Then just left-click on the file of your choice and drag it.
Upvotes: 1
Reputation: 1343
If the attachment is an image and you want to show the image in the Description or Comment field, you can copy the attachment link (see post of O. R. Mapper) and then put an asterix in front of it:
![MicrosoftTeams-image.png](https://dev.azure.com/company/guid1/_apis/wit/attachments/guid2?fileName=MicrosoftTeams-image.png)
Upvotes: -1
Reputation: 20720
This would appear to be the least "hacky" way, as it relies entirely on the Azure DevOps UI:
Upvotes: 15
Reputation: 79
A workaround that I found to this which shows a selected text within the comment as clickable and opens the attachment if you click on it is:
Upvotes: 6