I'm trying to stream a binary file from a client request to Google Cloud Storage through my server.
I'm using the Tornado framework to stream the data from the request to the server and Google Cloud Storage API for streaming the file to Google -upload_from_file
method.
I'm new to Tornado and I'm using the @stream_request_body
decorator so I can get the data from the request in chunks and upload each chunk to Google.
I've tried to open a file-like object to which I can write each chunk while uploading the 'file' itself to Google.
The problem is that I can't upload the 'file' to Google before I start writing chunks to it.
Any assistance would be much appreciated.