IDocumentClient.UpsertAttachmentAsync Method

Definition

Overloads

UpsertAttachmentAsync(String, Stream, MediaOptions, RequestOptions)

Upserts an attachment with the contents of the provided mediaStream as an asynchronous operation in the Azure DocumentDB database service.

UpsertAttachmentAsync(String, Object, RequestOptions)

Upserts an attachment as an asychronous operation in the Azure DocumentDB database service.

UpsertAttachmentAsync(Uri, Object, RequestOptions)

Upserts an attachment as an asychronous operation in the Azure DocumentDB database service.

UpsertAttachmentAsync(Uri, Stream, MediaOptions, RequestOptions)

Upserts an attachment as an asynchronous operation in the Azure DocumentDB database service.

UpsertAttachmentAsync(String, Stream, MediaOptions, RequestOptions)

Upserts an attachment with the contents of the provided mediaStream as an asynchronous operation in the Azure DocumentDB database service.

public System.Threading.Tasks.Task<Microsoft.Azure.Documents.Client.ResourceResponse<Microsoft.Azure.Documents.Attachment>> UpsertAttachmentAsync (string documentLink, System.IO.Stream mediaStream, Microsoft.Azure.Documents.Client.MediaOptions options = null, Microsoft.Azure.Documents.Client.RequestOptions requestOptions = null);
Parameters
documentLink
String

The link of the parent document for this new attachment. E.g. dbs/db_rid/colls/col_rid/docs/doc_rid/

mediaStream
Stream

The Stream of the attachment media.

options
MediaOptions

(Optional) The MediaOptions for the request.

requestOptions
RequestOptions

(Optional) The RequestOptions for the request.

Returns

The Task object representing the service response for the asynchronous operation.

UpsertAttachmentAsync(String, Object, RequestOptions)

Upserts an attachment as an asychronous operation in the Azure DocumentDB database service.

public System.Threading.Tasks.Task<Microsoft.Azure.Documents.Client.ResourceResponse<Microsoft.Azure.Documents.Attachment>> UpsertAttachmentAsync (string documentLink, object attachment, Microsoft.Azure.Documents.Client.RequestOptions options = null);
Parameters
documentLink
String

The link of the parent document for this new attachment. E.g. dbs/db_rid/colls/col_rid/docs/doc_rid/

attachment
Object

The attachment object.

options
RequestOptions

(Optional) The RequestOptionsfor this request.

Returns

The Task object representing the service response for the asynchronous operation.

UpsertAttachmentAsync(Uri, Object, RequestOptions)

Upserts an attachment as an asychronous operation in the Azure DocumentDB database service.

public System.Threading.Tasks.Task<Microsoft.Azure.Documents.Client.ResourceResponse<Microsoft.Azure.Documents.Attachment>> UpsertAttachmentAsync (Uri documentUri, object attachment, Microsoft.Azure.Documents.Client.RequestOptions options = null);
Parameters
documentUri
Uri

The URI of the document to upsert an attachment for.

attachment
Object

The Attachment object.

options
RequestOptions

(Optional) The RequestOptions for the request.

Returns

The task object representing the service response for the asynchronous operation.

UpsertAttachmentAsync(Uri, Stream, MediaOptions, RequestOptions)

Upserts an attachment as an asynchronous operation in the Azure DocumentDB database service.

public System.Threading.Tasks.Task<Microsoft.Azure.Documents.Client.ResourceResponse<Microsoft.Azure.Documents.Attachment>> UpsertAttachmentAsync (Uri documentUri, System.IO.Stream mediaStream, Microsoft.Azure.Documents.Client.MediaOptions options = null, Microsoft.Azure.Documents.Client.RequestOptions requestOptions = null);
Parameters
documentUri
Uri

The URI of the document to upsert an attachment for.

mediaStream
Stream

The stream of the attachment media.

options
MediaOptions

The MediaOptions for the request.

requestOptions
RequestOptions

The RequestOptions for the request.

Returns

The task object representing the service response for the asynchronous operation.