Downloading files in an crossbario/autobahn context / best practice



Here is the context :

an application accessible through a url like

it is handled by crossbario for the initial ‘index.html’ file and a bunch of rpc/pub/sub routines.

I need to be able to download files from the application. The URL to a specific file is like

where 123456 is a uid and the actual file data is in a DB’s table referenced by the uid (so I need code to get the file’s data).

The url for file download can be sent by email to the user and he needs to get the file by simply clicking on the url. So no way to transform the http GET into anything else.

What is the best practice to do that ?

Here are the solutions I have imagined :

  1. Put a reverse proxy in front of crossbario and have ‘download’ handled outside of crossbario
  2. hook a wsgi module to crossbar to handle downloads
    Are there other solutions ?

According to your background on developing crossbario applications, what is the best practice ?

Thanks for your help.