You probably want to send the image to the Host's REST API using a library such as requests
.
On the Bridge Host in the view that receives the file from the client, you will need to get a handle on the file:
# Get the file sent by the Client
image_file = request.FILES.get('name_of_file')
Then you'll need to post that file to the REST API end point of the Host.
# Post the file to the Host from the Bridge Host using "requests" library
requests.post('/Host/image/endpoint/url', data={'name_of_file', image_file.read()})
You will need to pip install requests
on the Bridge Host if it is not already present.
More info about making POST requests using requests
: http://docs.python-requests.org/en/master/user/quickstart/#post-a-multipart-encoded-file