how can i retrieve file from rainbowSDK.im.getMessagesFromConversation
Answeredwhen i retrieve some messages with rainbowSDK.im.getMessagesFromConversation , i got a json response that contains some key. I see key "type" that have value "FileSharing " if the conversation contain file. The question is how can i retrieve file in the json that gained from rainbowSDK.im.getMessagesFromConversation API.
You see in that picture above, i just use
<p ng-switch on="$ctrl.item.type.value">
<span ng-switch-when="FileSharing">
Get File
</span>
</p>
because i don't know how to get file from rainbowSDK.im.getMessagesFromConversation.
thanks for response :D
-
Hi,
Right you should use the FileStorage Service:
https://hub.openrainbow.com/#/documentation/doc/sdk/web/api/fileStorage
Could you please tell me which API do you use and what is the error ?
-
Hi,
The way to get the file from the server is using blob:
https://hub.openrainbow.com/#/documentation/doc/sdk/web/api/fileStorage
Could you test with adding blob: before the https://... in your img tag's src ?
Like:<img src="blob:https://sandbox.openrainbow.com:443/api/rainbow/fileserver/..."/>
Please tell me if it worked well.
Thanks,
Pascal
Please sign in to leave a comment.
Comments
8 comments