Skip to content

Commit b2c3504

Browse files
authored
Merge pull request #41 from dt3310321/s3
Fix up Chinese filename download bug
2 parents 9d88922 + e965428 commit b2c3504

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

qcloud_cos/cos_op.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def build_download_url(self, bucket, cos_path, sign):
8181
# Only support http now
8282
appid = self._cred.get_appid()
8383
hostname = self._config.get_download_hostname()
84-
cos_path = urllib.quote(cos_path)
84+
cos_path = urllib.quote(cos_path.encode('utf8'), '~/')
8585
url_tmpl = 'http://{bucket}-{appid}.{hostname}{cos_path}?sign={sign}'
8686

8787
return url_tmpl.format(bucket=bucket, appid=appid, hostname=hostname, cos_path=cos_path, sign=sign)

0 commit comments

Comments
 (0)