Hello,
I鈥檓 created a chat client into a custom app and using the rest api to communicate with RocketChat.
I am uploading files over the function "/api/v1/rooms.upload", but the return value of this call is only if it was successful or not. Is there any chance to get a message object with the attachment information鈥檚? Because I want to show the uploaded file at the messages in my app.
At this time I create a message object in the frontend, but I think that is not the best way to show the uploaded file as a message.
Bye Andreas H.
@AndreasHo you are right I think we should return message object too. It just return return API.v1.success();currently. Let see what others think of this. If approved, I will make a fix for this.
cc @ggazzo @tassoevan @sampaiodiego should we send message object back on file upload via API?
@knrt10 I think it is fine to return the message object :+1:
Ok, will make a PR for this.
@sampaiodiego while we are on this, should there be the endpoint for getting file Data? Currently, there is not. Like rooms.upload/:id
Most helpful comment
@knrt10 I think it is fine to return the message object :+1: