Language

SearchIndexClient.UploadKnowledgeSourceFileMultipart Method

Definition

Overloads

Name Description
UploadKnowledgeSourceFileMultipart(String, UploadKnowledgeSourceFileMultipartRequest, CancellationToken)

Uploads a file to a File knowledge source using multipart/form-data: a JSON 'metadata' part (file name and custom metadata) and a 'content' part with the raw file bytes.

UploadKnowledgeSourceFileMultipart(String, RequestContent, String, RequestContext)

[Protocol Method] Uploads a file to a File knowledge source using multipart/form-data: a JSON 'metadata' part (file name and custom metadata) and a 'content' part with the raw file bytes.

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.

UploadKnowledgeSourceFileMultipart(String, UploadKnowledgeSourceFileMultipartRequest, CancellationToken)

Source:
SearchIndexClient.cs

Uploads a file to a File knowledge source using multipart/form-data: a JSON 'metadata' part (file name and custom metadata) and a 'content' part with the raw file bytes.

public virtual Azure.Response<Azure.Search.Documents.Indexes.Models.KnowledgeSourceFile> UploadKnowledgeSourceFileMultipart(string sourceName, Azure.Search.Documents.Indexes.Models.UploadKnowledgeSourceFileMultipartRequest body, System.Threading.CancellationToken cancellationToken = default);
abstract member UploadKnowledgeSourceFileMultipart : string * Azure.Search.Documents.Indexes.Models.UploadKnowledgeSourceFileMultipartRequest * System.Threading.CancellationToken -> Azure.Response<Azure.Search.Documents.Indexes.Models.KnowledgeSourceFile>
override this.UploadKnowledgeSourceFileMultipart : string * Azure.Search.Documents.Indexes.Models.UploadKnowledgeSourceFileMultipartRequest * System.Threading.CancellationToken -> Azure.Response<Azure.Search.Documents.Indexes.Models.KnowledgeSourceFile>
Public Overridable Function UploadKnowledgeSourceFileMultipart (sourceName As String, body As UploadKnowledgeSourceFileMultipartRequest, Optional cancellationToken As CancellationToken = Nothing) As Response(Of KnowledgeSourceFile)

Parameters

sourceName
String

The name of the knowledge source.

body
UploadKnowledgeSourceFileMultipartRequest

The multipart/form-data body containing the metadata and content parts.

cancellationToken
CancellationToken

The cancellation token that can be used to cancel the operation.

Returns

Exceptions

sourceName or body is null.

sourceName is an empty string, and was expected to be non-empty.

Service returned a non-success status code.

Applies to

UploadKnowledgeSourceFileMultipart(String, RequestContent, String, RequestContext)

Source:
SearchIndexClient.cs

[Protocol Method] Uploads a file to a File knowledge source using multipart/form-data: a JSON 'metadata' part (file name and custom metadata) and a 'content' part with the raw file bytes.

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
public virtual Azure.Response UploadKnowledgeSourceFileMultipart(string sourceName, Azure.Core.RequestContent content, string contentType, Azure.RequestContext context = default);
abstract member UploadKnowledgeSourceFileMultipart : string * Azure.Core.RequestContent * string * Azure.RequestContext -> Azure.Response
override this.UploadKnowledgeSourceFileMultipart : string * Azure.Core.RequestContent * string * Azure.RequestContext -> Azure.Response
Public Overridable Function UploadKnowledgeSourceFileMultipart (sourceName As String, content As RequestContent, contentType As String, Optional context As RequestContext = Nothing) As Response

Parameters

sourceName
String

The name of the knowledge source.

content
RequestContent

The content to send as the body of the request.

contentType
String

The contentType to use which has the multipart/form-data boundary.

context
RequestContext

The request options, which can override default behaviors of the client pipeline on a per-call basis.

Returns

The response returned from the service.

Exceptions

sourceName, content or contentType is null.

sourceName or contentType is an empty string, and was expected to be non-empty.

Service returned a non-success status code.

Applies to