Skip to content

Commit c077d4e

Browse files
committed
Merge branch 'develop'
2 parents cfe6a0a + df5f402 commit c077d4e

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

bgesdk/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
from aliyunsdkcore.auth.credentials import StsTokenCredential
2727
from aliyunsdkcore.client import AcsClient
28-
from posixpath import split, join, isdir
28+
from posixpath import split, join, isdir, isfile
2929
from requests_toolbelt.multipart import encoder
3030
from six import text_type
3131
from six.moves.urllib.parse import urljoin, urlencode
@@ -794,7 +794,7 @@ def _upload(self, token, filename, file_or_string, part_size=None,
794794
object_name = '%s/%s' % (destination, filename)
795795
bge_open_client_id_header = 'x-oss-meta-bge-open-client-id'
796796
custom_headers = { bge_open_client_id_header: client_id }
797-
if isinstance(file_or_string, str):
797+
if isinstance(file_or_string, str) and isfile(file_or_string):
798798
# 分片上传仅支持文件路径,不支持文件对象
799799
oss2.resumable_upload(
800800
bucket,

bgesdk/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#-*- coding: utf-8 -*-
22

3-
__version__ = '0.5.0'
3+
__version__ = '0.5.1'

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[metadata]
22
name = bge-python-sdk
3-
version = 0.5.0
3+
version = 0.5.1
44
description = 可用于调用 BGE 开放平台的相关接口。
55
long_description = file: README.md
66
long_description_content_type = text/markdown

0 commit comments

Comments
 (0)