I kept searching for the solution for sending and receiving file through XMPP on INTERNET and and asked a qustion on Quora also as per the answer given by Simon Tennant on this
Think of XMPP as a signalling system: as such you really don't want to be sending files inside XMPP messages.
At the same time HTTP is optimised for file delivery and XMPP can assure you that the requester is really who they say they are.
Putting the two together (XMPP request + token to retrieve the file + endpoint) and http for actually grabbing the file, you have a nice way to retrieve files.
AS per answers Simon Tennant from this
Flow1
As shown in below image one have to use one dedicated media server(http server) to handle image/video file.Normal text messages will be send using XMPP while image will be send to media server and a signal will be send [which contain token] using xmpp.
As per Alex answer given on this
{5222, ejabberd_c2s, [ {certfile, "D:\var\ejabberd\certs\AG-SoftwareXMPP Components and Competence " AG-Software.pem"}, starttls, {access, c2s}, {shaper, c2s_shaper}, {max_stanza_size, 65536} ]}
Flow2Then one can use XMPP stanza to send image(base64) string as shown in below image
Note :: if my understanding is wrong then any correction in operation of flow1 and flow2 will be really helpful
My questions are as below
1>>.From my research I found that flow1 is more popular then flow2, can someone help me to understand what are the rezones behind it?
2>>.One can have control on xmpp stanza size ,then what are the server side(ejabberd)complication while passing a large file[as per example 2 mb] from one client to another client?
Any clarity on above question will be really helpful!!!
Thank you !!!!!
What is the preferable way to
Hi devlad,
Which flow did you use finally ? I'm looking for the best solution for sending and receiving file through XMPP.
Can you post an update on your experience ?
Thanks.
What is the preferable way to
Sending file through XMPP canonical approach is:
1. Negotiation through XMPP
2. Sending the file out of band through the negotiated approach.