简体   繁体   English

使用 XMPP 框架将文件发送到 MUC 房间

[英]send files to MUC Rooms using XMPP Framework

How to send files to MUC Rooms using XMPP Framework?如何使用 XMPP 框架将文件发送到 MUC 房间? I have searched a lot about this.我已经搜索了很多关于这个。

Using the SI method i get error 503 service unavailable or Wrong JID ,but how to pass a resource for groupchat ?使用 SI 方法我得到错误503 service unavailable or Wrong JID ,但如何为群聊传递资源?

I had used the method to transfer image using string data but now its not up to my needs.我曾使用该方法使用字符串数据传输图像,但现在不能满足我的需要。 I read that we can upload file to server and send the link instead.我读到我们可以将文件上传到服务器并发送链接。 I'm using openfire server.我正在使用 openfire 服务器。

If anybody has some insight about this please share.如果有人对此有一些见解,请分享。 Any help is appreciated.任何帮助表示赞赏。 Thanks !谢谢 !

Yes you can upload your image to a server and send the link.是的,您可以将图像上传到服务器并发送链接。 The flow goes like this:流程是这样的:

You need to send a thumbnail image using xmpp (and the link of the original image stored on server), like you must be sending the entire image now in your application.您需要使用 xmpp 发送缩略图(以及存储在服务器上的原始图像的链接),就像您现在必须在应用程序中发送整个图像一样。

When the user clicks on the thumbnail image, you can download the original image from the server using that link.当用户单击缩略图时,您可以使用该链接从服务器下载原始图像。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM