Possible to transmit files using Crossbar.io and WAMP?

213 views Asked by At

Is it possible to use WAMP / Crossbar to send small simple files, such as .txt?

At the moment, I have this snippet of tutorial code in Python:

def sendSketch(self, datastring):
    if datastring == "1":
        payload = b'1'

How can I get Python to send out files instead of just a '1'?
This is a pressing need - any help on how to do this would be greatly appreciated.

1

There are 1 answers

0
gzost On

AFAIK it's not possible to send files. Your code has to get the file, encode it into something which your chosen serialization can handle (e.g. base64 for JSON), and the receiver then has to decode and create a file from this.