From da7b5c7712b83a0a1f2c951a5f3bd6e2cfae00ae Mon Sep 17 00:00:00 2001 From: "yanggang.james" Date: Thu, 19 Nov 2020 17:49:54 +0800 Subject: [PATCH] feat: add upload headers. --- ttvcloud/vod/VodService.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ttvcloud/vod/VodService.py b/ttvcloud/vod/VodService.py index 64d484b..0286460 100644 --- a/ttvcloud/vod/VodService.py +++ b/ttvcloud/vod/VodService.py @@ -152,10 +152,11 @@ def upload(self, space_name, file_path, file_type): session_key = resp['Result']['UploadAddress']['SessionKey'] auth = resp['Result']['UploadAddress']['StoreInfos'][0]['Auth'] host = resp['Result']['UploadAddress']['UploadHosts'][0] - + upload_headers = resp['Result']['UploadAddress']['UploadHeader'] url = 'http://{}/{}'.format(host, oid) headers = {'Content-CRC32': check_sum, 'Authorization': auth} + headers.update(upload_headers) start = time.time() upload_status = False