Skip to content

Commit d31c302

Browse files
authored
Bump up limit for using multi chunk to 64MB (#109)
Parity with the Ruby SDK xdevplatform/twitter-ruby-ads-sdk#135
1 parent 05e2963 commit d31c302

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

twitter_ads/http.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ class TONUpload(object):
198198
_DEFAULT_RESOURCE = '/1.1/ton/bucket/'
199199
_DEFAULT_BUCKET = 'ta_partner'
200200
_DEFAULT_EXPIRE = datetime.now() + timedelta(days=10)
201-
_MIN_FILE_SIZE = 1024 * 1024 * 1
201+
_MIN_FILE_SIZE = 1024 * 1024 * 64
202202

203203
def __init__(self, client, file_path, **kwargs):
204204
if not os.path.isfile(file_path):
@@ -263,7 +263,7 @@ def perform(self):
263263
self.__upload_chunk(location, chunk_size, bytes, bytes_start, bytes_read)
264264
f.close()
265265

266-
return location
266+
return location.split("?")[0]
267267

268268
def __repr__(self):
269269
return '<{name} object at {mem} bucket={bucket} file={file}>'.format(

0 commit comments

Comments
 (0)