WorkItemTrackingHttpClientBase.CreateAttachmentAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
CreateAttachmentAsync(Stream, String, String, String, Object, CancellationToken) |
[Preview API] Uploads an attachment. |
CreateAttachmentAsync(Stream, Guid, String, String, String, Object, CancellationToken) |
[Preview API] Uploads an attachment. |
CreateAttachmentAsync(Stream, String, String, String, String, Object, CancellationToken) |
[Preview API] Uploads an attachment. |
CreateAttachmentAsync(Stream, String, String, String, Object, CancellationToken)
[Preview API] Uploads an attachment.
public virtual System.Threading.Tasks.Task<Microsoft.TeamFoundation.WorkItemTracking.WebApi.Models.AttachmentReference> CreateAttachmentAsync (System.IO.Stream uploadStream, string fileName = null, string uploadType = null, string areaPath = null, object userState = null, System.Threading.CancellationToken cancellationToken = null);
override this.CreateAttachmentAsync : System.IO.Stream * string * string * string * obj * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.TeamFoundation.WorkItemTracking.WebApi.Models.AttachmentReference>
Parameters
- uploadStream
- Stream
Stream to upload
- fileName
- String
The name of the file
- uploadType
- String
Attachment upload type: Simple or Chunked
- areaPath
- String
Target project Area Path
- userState
- Object
- cancellationToken
- CancellationToken
The cancellation token to cancel operation.
Returns
Applies to
CreateAttachmentAsync(Stream, Guid, String, String, String, Object, CancellationToken)
[Preview API] Uploads an attachment.
public virtual System.Threading.Tasks.Task<Microsoft.TeamFoundation.WorkItemTracking.WebApi.Models.AttachmentReference> CreateAttachmentAsync (System.IO.Stream uploadStream, Guid project, string fileName = null, string uploadType = null, string areaPath = null, object userState = null, System.Threading.CancellationToken cancellationToken = null);
override this.CreateAttachmentAsync : System.IO.Stream * Guid * string * string * string * obj * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.TeamFoundation.WorkItemTracking.WebApi.Models.AttachmentReference>
Parameters
- uploadStream
- Stream
Stream to upload
- project
- Guid
Project ID
- fileName
- String
The name of the file
- uploadType
- String
Attachment upload type: Simple or Chunked
- areaPath
- String
Target project Area Path
- userState
- Object
- cancellationToken
- CancellationToken
The cancellation token to cancel operation.
Returns
Applies to
CreateAttachmentAsync(Stream, String, String, String, String, Object, CancellationToken)
[Preview API] Uploads an attachment.
public virtual System.Threading.Tasks.Task<Microsoft.TeamFoundation.WorkItemTracking.WebApi.Models.AttachmentReference> CreateAttachmentAsync (System.IO.Stream uploadStream, string project, string fileName = null, string uploadType = null, string areaPath = null, object userState = null, System.Threading.CancellationToken cancellationToken = null);
override this.CreateAttachmentAsync : System.IO.Stream * string * string * string * string * obj * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.TeamFoundation.WorkItemTracking.WebApi.Models.AttachmentReference>
Parameters
- uploadStream
- Stream
Stream to upload
- project
- String
Project ID or project name
- fileName
- String
The name of the file
- uploadType
- String
Attachment upload type: Simple or Chunked
- areaPath
- String
Target project Area Path
- userState
- Object
- cancellationToken
- CancellationToken
The cancellation token to cancel operation.
Returns
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for