Messaggio Immagine¶
Formato del Messaggio¶
Key |
Value |
Description |
|---|---|---|
body:type |
chat_image |
Tipo di messaggio |
body:arguments |
json object |
Contenuto del messaggio |
arguments:filename |
String |
Nome del file |
arguments:url |
String |
Url di riferimento del file |
arguments:thumbUrl |
String |
Thumb di riferimento del file |
arguments:caption |
String |
Caption del file |
Esempio¶
<message to="bob@wfp" id="51c9b72c-f2f1-4e8d-927b-33401065cf0f-211610484933107" type="chat">
<thread>9e036646-48a9-477d-a165-6feaea487c76</thread>
<body>{
"arguments": {
"filename": "image.png",
"url": "https://xmpp-svil.monksoftware.it/api/v1/attachments/pictures/image.png",
"thumbUrl": "https://xmpp-svil.monksoftware.it/api/v1/attachments/pictures/thumb_image.png",
"caption": "Caption dell'immagine"
},
"chat_type": "chat",
"creation_date": "2024-10-14T17:54:40.8070000Z",
"domain": "chat",
"identifier": "0b6685ba-7118-4a1d-84ba-138f328ec54e-211610540337024",
"language": "eng",
"type": "chat_image",
"version": "1.0"
}</body>
</message>
HTTP Request¶
- Method:
POST
- HOST:
https://xmpp-svil.monksoftware.it/api/v1/attachments/pictures
- Content-Type:
multipart/form-data;
- Content-Length:
30935
- Content-Disposition:
form-data; name=”attachment”; filename=”1527068000743.jpg”
- Content-Type:
image/jpg
- Content-Length:
30720
HTTP Response¶
- Response:
200 OK
- HOST:
https://xmpp-svil.monksoftware.it/api/v1/attachments/pictures
{
"status": "201",
"response": "Created",
"datetime": 1527068330108,
"body": {
"url": "https://xmpp-svil.monksoftware.it/api/v1/attachments/pictures/60bfd944ed60fced1182eff74e262d14.jpg",
"thumb": "https://xmpp-svil.monksoftware.it/api/v1/attachments/pictures/thumb_60bfd944ed60fced1182eff74e262d14.png"
}
}