[Standards] Request HTTP upload slots over XMPP

Daniel Gultsch daniel at gultsch.de
Sun Jun 28 12:25:44 UTC 2015


current file transfer techniques in XMPP all share the same downside. They
are P2P and thus don't work with Carbons and MUCs. The synchronous nature
of P2P protocols also doesn't play nicely with MAM.

Uploading files manually to an HTTP server and sharing the link has been an
workaround for this for a long time now. (This has also been used in the
good old IRC age)

While users have a variety of services to choose from (imgur, mediacrush,
self hosted OwnCloud, Google Drive, ...) the major downside of this is that
an xmpp client can not automate this process since the different services
don't share a common api.

Furthermore using a third party service might require the user to enter
additional credentials on top of the XMPP credentials.

Thus it would make perfect sense to have the xmpp provider also provide a
way to upload files to an HTTP server.

Today I want to introduce a simple protocol for requesting what I call
'HTTP upload slots'.
An HTTP upload slot is basically a tuple of a PUT and a GET URL.

The user requests a slot from a component (most commonly running on the
users servers and discoverable by disco items) providing a desired file
name and a file size. The component does some checking on the data (quota,
max file size, authorization) and provides the user with a PUT and a GET
url which both are unique. (long random string in path)



<iq to='upload.domain.tld' id='random1' type='get'>
<request xmlns='urn:xmpp:http:upload'>


<iq to='user at domain.tld' id='random1' type='result'>
<slot xmlns='urn:xmpp:http:upload'>

Note that the get and put host are not the same. This allows for the files
to (optionally) be served over some standard HTTP server /or even a CDN.

Also note that the user provided file name is reflected in the GET url as
well this way allowing the recipient of that URL to see the original file
name. (However this is the something a sane component should do and is not

I would like to get some comments before I actually put this down into a

For those interested here: https://github.com/siacs/HttpUploadComponent is
a sample python implementation of such a component.

And here is a branch for Conversations that can talk to that component.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.jabber.org/pipermail/standards/attachments/20150628/5f83d8cb/attachment.html>

More information about the Standards mailing list