Chat Thread - Upload Chat Image
사용자를 대신하여 스레드에 이미지를 업로드합니다.
POST {endpoint}/chat/threads/{chatThreadId}/images?api-version=2024-03-15-preview
URI 매개 변수
Name | In(다음 안에) | 필수 | 형식 | Description |
---|---|---|---|---|
chat
|
path | True |
string |
업로드된 이미지가 속한 스레드 ID입니다. (Teams 모임에만 해당) |
endpoint
|
path | True |
string |
Azure Communication 리소스의 엔드포인트입니다. |
api-version
|
query | True |
string |
호출할 API의 버전입니다. |
요청 헤더
Media Types: "application/octet-stream"
Name | 필수 | 형식 | Description |
---|---|---|---|
Authorization | True |
string |
ACS(Azure Communication Services) 사용자 액세스 토큰입니다. |
image-filename |
string |
이미지의 파일 이름입니다. |
요청 본문
Media Types: "application/octet-stream"
Name | 형식 | Description |
---|---|---|
chatImageFile |
string |
이미지 이진 데이터, 허용되는 이미지 형식: jpeg, png, gif, heic, webp |
응답
Name | 형식 | Description |
---|---|---|
201 Created |
성공적으로 업로드되면 헤더에 |
|
Other Status Codes |
작업이 실패한 이유를 설명하는 오류 응답입니다. |
보안
Authorization
ACS(Azure Communication Services) 사용자 액세스 토큰입니다.
Type:
apiKey
In:
header
예제
Upload Image
Sample Request
POST https://contoso.westus.communications.azure.com/chat/threads/19:34adfa4f-cedf-4dc0-ba29-b6d1a69ab345@thread.v2/images?api-version=2024-03-15-preview
"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAAAAAA6fptVAAAACklEQVQYV2P4DwABAQEAWk1v8QAAAABJRU5ErkJggg=="
Sample Response
Location: /chat/threads/19:34adfa4f-cedf-4dc0-ba29-b6d1a69ab345@thread.v2/images/0-eus-d2-fb42e272282ebb6ef76a3aedd1974433
{
"id": "0-eus-d2-fb42e272282ebb6ef76a3aedd1974433",
"attachmentType": "inlineImage",
"name": "sample.png"
}
정의
Name | Description |
---|---|
Chat |
첨부 파일의 형식입니다. |
Error |
오류 응답 정보입니다. |
Error |
오류 세부 정보입니다. |
Error |
ARM 지침을 따르기 위한 오류 응답에 대한 래퍼입니다. |
Upload |
이미지 업로드를 위한 결과 페이로드입니다. |
ChatAttachmentType
첨부 파일의 형식입니다.
Name | 형식 | Description |
---|---|---|
file |
string |
|
image |
string |
Error
오류 응답 정보입니다.
Name | 형식 | Description |
---|---|---|
code |
string |
오류 코드 |
details |
오류 세부 정보 개체의 배열 |
|
message |
string |
오류 메시지입니다. |
ErrorDetail
오류 세부 정보입니다.
Name | 형식 | Description |
---|---|---|
code |
string |
오류 코드 |
message |
string |
오류 메시지입니다. |
ErrorResponse
ARM 지침을 따르기 위한 오류 응답에 대한 래퍼입니다.
Name | 형식 | Description |
---|---|---|
error |
오류 응답입니다. |
UploadChatImageResult
이미지 업로드를 위한 결과 페이로드입니다.
Name | 형식 | Description |
---|---|---|
attachmentType |
첨부 파일의 형식입니다. |
|
id |
string |
서버에서 생성된 이미지 ID입니다. |
name |
string |
첨부 파일의 파일 확장명 형식을 포함하는 이름입니다. |