cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1055
Views
0
Helpful
0
Replies

Streaming Download for Large NBR Recordings?

TyHitzeman82708
Level 1
Level 1

I'm downloading WebEx recordings via the NBR API's DownloadNBRStorageFile call. However, it appears there is no option to stream the response -- instead it returns the entire recording and the other xml data at once. I have some very large recordings (3+hours), so holding an entire recording in memory is not an option. Normally I'd just stream the download, but I don't see how that's possible with the multi-part SOAP response. Does anyone have any guidance for this?

 

For reference, here's what I'm doing now:

 

import requests
import io from requests_toolbelt.multipart import decoder resp = requests.post(url, headers, data, stream=True) # huge object that consumes lots of memory multipart_data = decoder.MultipartDecoder.from_response(resp) audio = multipart_data.parts[2].content b = io.BytesIO(audio) # another huge object self.logger.info(f"Writing audio/video data to myfile.mp4") with open("myfile.mp4", "wb") as outfile: outfile.write(b.getbuffer())

 

0 Replies 0