Edit

Share via


WorkItemTrackingHttpClientBase.CreateAttachmentAsync Method

Definition

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