Skip to content

Conversation

okbang9
Copy link
Contributor

@okbang9 okbang9 commented May 18, 2021

No description provided.

@okbang9 okbang9 force-pushed the features/resumable-upload-v2 branch from 5542676 to e112a2e Compare May 19, 2021 03:27
.idea/.gitignore Outdated
/dataSources/
/dataSources.local.xml
# Editor-based HTTP Client requests
/httpRequests/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@okbang9 .idea 目录不要提交

test_qiniu.py Outdated
ret, info = put_stream(token, key, input_stream, os.path.basename(__file__), size, hostscache_dir,
self.params,
self.mime_type, part_size=1024 * 1024 * 10, version='v2', bucket_name=bucket_name)
print("\n\n\n\n\n", info)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@okbang9 不要加这么多回车。。

@codecov
Copy link

codecov bot commented May 19, 2021

Codecov Report

Merging #391 (5013303) into master (c4fb290) will increase coverage by 1.56%.
The diff coverage is 79.05%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #391      +/-   ##
==========================================
+ Coverage   66.22%   67.78%   +1.56%     
==========================================
  Files          20       20              
  Lines        1723     1847     +124     
==========================================
+ Hits         1141     1252     +111     
- Misses        582      595      +13     
Impacted Files Coverage Δ
qiniu/config.py 71.42% <66.66%> (-1.65%) ⬇️
qiniu/services/storage/uploader.py 79.48% <71.96%> (-4.76%) ⬇️
qiniu/http.py 69.66% <100.00%> (+8.74%) ⬆️
test_qiniu.py 93.77% <100.00%> (+0.48%) ⬆️
qiniu/services/storage/bucket.py 78.57% <0.00%> (-0.80%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c4fb290...5013303. Read the comment docs.

return record['offset']

def upload(self):
def upload(self, metadata=None):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@okbang9 这个 metadata 先不要罢,v1 其实也有这个参数,但是这个 sdk 也没支持,所以先去掉。

venv/pyvenv.cfg Outdated
@@ -0,0 +1,3 @@
home = /usr/local/bin
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@okbang9 这个目录不应该提交的

if ret is None or crc != ret['crc32']:
return ret, info
if self.version == 'v1':
if info.need_retry():
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@okbang9 v1 的 crc32 验证不能去掉啊

def block_url(self, host, size):
return '{0}/mkblk/{1}'.format(host, size)

def block_url_v2(self, host, bucket_name):
encode_object_name = urlsafe_base64_encode(self.key) if self.key is not None else '~'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@okbang9 encode_object_name => encoded_object_name

@e06084 e06084 merged commit a0ae428 into master May 20, 2021
@bachue bachue deleted the features/resumable-upload-v2 branch May 21, 2021 07:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants