For that, we added a POST /api/bots/:bot_id/sessions/:session_id/attachment endpoint that receives an image as a file upload (in a file field). The endpoint returns the new upload's UUID.
After that, via the websocket, there's a new utb_img message type. It's content should have an image key, with the returned UUID value.
Images are linked to a bot & session for access control - ie, a user can't send a utb_img with the UUID of another users' image.
Make websocket support image attachments.
For that, we added a
POST /api/bots/:bot_id/sessions/:session_id/attachment
endpoint that receives an image as a file upload (in afile
field). The endpoint returns the new upload's UUID.After that, via the websocket, there's a new
utb_img
message type. It's content should have animage
key, with the returned UUID value.Images are linked to a bot & session for access control - ie, a user can't send a
utb_img
with the UUID of another users' image.CC: @vtiffenberg
See #64 See #175