多用户聊天中向多用户传输文件 [英] file transfer in multi user chat to muliple users
问题描述
我想在一个聊天室中将文件发送给多个用户,以便向所有人广播我.到目前为止,我还没有在互联网上找到解决此问题的任何方法或任何帮助.
i want to send files to multiple users in a one chat room so that i will be broadcasted to everyone. so far i havent found anything or any help on internet which resolve this issue.
目前,我尝试将文件逐个发送给每个用户,但是我认为这不是一种有效的方法,因此,如果有人使用其他方法,请告诉我们.
currently what i tried is to send a single file to each users one by one but i think that is not an efficient way so if someone has another approach then please do let know.
我也尝试过使用si-filetransfer
和bystream
发送文件.我想socks5 bytestream
在javascript中是不可能的,所以我还没有尝试过.
i have tried sending file using si-filetransfer
and bystream
also. socks5 bytestream
is not possible in javascript i guess so i havent tried that.
我正在使用openfire
服务器和stophe.js
使用javascript和XMPP协议发送文件
i am using openfire
server and stophe.js
to send files using javascript and XMPP protocol
推荐答案
将文件上传到服务器(例如您的OpenFire服务器),用户可以从中下载文件.
Upload the file to a server (e.g. your OpenFire server) where users can download the file from.
要通知您的用户他们需要下载文件,请使用XEP-0066向他们发送节:带外数据或按照XEP-0071中的说明对节中的链接进行编码.
To notify your users that they need to download a file, send them a stanza using XEP-0066: Out of Band Data or encode the link in a stanza as described in XEP-0071.
参考:
http://xmpp.org/extensions/xep-0071.html
这篇关于多用户聊天中向多用户传输文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!