IDocumentClient.CreateAttachmentAsync
Method
Definition
Overloads
| CreateAttachmentAsync(String, Object, RequestOptions) |
Creates an attachment as an asychronous operation in the Azure DocumentDB database service. |
| CreateAttachmentAsync(Uri, Object, RequestOptions) |
Creates an attachment as an asychronous operation in the Azure DocumentDB database service. |
| CreateAttachmentAsync(String, Stream, MediaOptions, RequestOptions) |
Creates an attachment with the contents of the provided |
| CreateAttachmentAsync(Uri, Stream, MediaOptions, RequestOptions) |
Creates an attachment as an asynchronous operation in the Azure DocumentDB database service. |
CreateAttachmentAsync(String, Object, RequestOptions)
Creates 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>> CreateAttachmentAsync (string documentLink, object attachment, Microsoft.Azure.Documents.Client.RequestOptions options = null);
- 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 RequestOptions for the request.
The Task object representing the service response for the asynchronous operation.
CreateAttachmentAsync(Uri, Object, RequestOptions)
Creates 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>> CreateAttachmentAsync (Uri documentUri, object attachment, Microsoft.Azure.Documents.Client.RequestOptions options = null);
- documentUri
- Uri
The URI of the document to create an attachment for.
- attachment
- Object
The attachment object.
- options
- RequestOptions
(Optional) The RequestOptions for the request.
The task object representing the service response for the asynchronous operation.
CreateAttachmentAsync(String, Stream, MediaOptions, RequestOptions)
Creates 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>> CreateAttachmentAsync (string documentLink, System.IO.Stream mediaStream, Microsoft.Azure.Documents.Client.MediaOptions options = null, Microsoft.Azure.Documents.Client.RequestOptions requestOptions = null);
- documentLink
- String
The link of the parent document for this new attachment. E.g. dbs/db_rid/colls/col_rid/docs/doc_rid/
- options
- MediaOptions
(Optional) The MediaOptions for the request.
- requestOptions
- RequestOptions
(Optional) The RequestOptions for the request.
The task object representing the service response for the asynchronous operation.
If either documentLink or mediaStream is not set.
CreateAttachmentAsync(Uri, Stream, MediaOptions, RequestOptions)
Creates 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>> CreateAttachmentAsync (Uri documentUri, System.IO.Stream mediaStream, Microsoft.Azure.Documents.Client.MediaOptions options = null, Microsoft.Azure.Documents.Client.RequestOptions requestOptions = null);
- documentUri
- Uri
The URI of the document to create an attachment for.
- mediaStream
- Stream
The stream of the attachment media.
- options
- MediaOptions
The media options for the request.
- requestOptions
- RequestOptions
The request options for the request.
The task object representing the service response for the asynchronous operation.