tencentyun / cos-python-sdk-v4

Python SDK for COS v4
Apache License 2.0
38 stars 22 forks source link

fail to upload slice file #30

Closed DeoLeung closed 7 years ago

DeoLeung commented 7 years ago
2017-05-13 23:04:33.905 connectionpool:7453 DEBUG http://gz.file.myqcloud.com:80 "POST /files/v2/11111/bucket/log HTTP/1.1" 400 343
*** <?xml version='1.0' encoding='utf-8' ?>
<Error>
    <Code>InvalidRequest</Code>
    <Message>Missing required header for this request: Appid</Message>
    <Resource>-..myqcloud.com/files/v2/1111/bucket/log</Resource>
    <RequestId>NTkxNzIwODFfY2JhMzNiXzM0ZDhfZjU3MzVk</RequestId>
    <TraceId/>
</Error>

I don't see we need Appid in headers

DeoLeung commented 7 years ago

also the api return xml, not json...

liuchang0812 commented 7 years ago

hi, how could you get this? did you use this SDK?

DeoLeung commented 7 years ago

@Liuchang0812 yes, using UploadSliceFileRequest along with client.upload_file for a large file, about 700MB I manually constructed a request to the api, checked that was the JSON API error https://www.qcloud.com/document/api/436/606

liuchang0812 commented 7 years ago

well, thank you very much! I will check it now

liuchang0812 commented 7 years ago

@DeoLeung

Hi, we could re-produce this problem, and we will fix this problem in next release. thanks for your work. BTW, your appid and bucket is mistake. you cloud use service normally if you correct your appid.

please let me know if you still have problem. :+1:

DeoLeung commented 7 years ago

@Liuchang0812 I miss use the bucket 'domain name' as 'name', replacing it works fine

thank you