Skip to content

Attachment

This feature we allow user to upload attachment to application, Attachment file can be image, voice record, audio, video, pdf, plane text and so on.

Namespace : /bot

Endpoint : /{{chatmeBotToken}}/upload

Request URL: baseURL/bot/{{chatmeBotToken}}/upload

Http method : POST

Auth required : YES

Note: Limit file size 20 MB

Data example

Content-Type: form-data

{
"body": {
"attachment": "FDUk6wFVQAIiUWs.jpg",
}
}

Content example

{
"data": {
"user": "63f9863688beabe1106c5541",
"url": "https://wrs.chat-me.chat/s3/chat-me/1974506",
"originalName": "FDUk6wFVQAIiUWs.jpg",
"fileType": "image/jpeg",
"fileSize": "182926",
"mimeType": "image/jpeg",
"hasQrcode": false,
"createdAt": "2023-02-21T09:25:48.785Z",
"_id": "63f48e520d47825b4202318c",
"__v": 0
}
}

Error CodeMessageHttp Status Code
40012Invalid file content400
40013File upload error400
40015This attachment size is too large400