Skip to content

Commit

Permalink
fix(upload): update multipart uploading's threshold
Browse files Browse the repository at this point in the history
  • Loading branch information
hidekuma committed Sep 7, 2021
1 parent e97d3a1 commit f1c6799
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion flask_s3_viewer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

APP_TEMPLATE_FOLDER = FIXED_TEMPLATE_FOLDER

__version__ = "0.2.1"
__version__ = "0.2.2"


class Singleton(type):
Expand Down
7 changes: 2 additions & 5 deletions flask_s3_viewer/aws/s3.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,12 +170,9 @@ def post_presign(self, object_name, bucket_name=None, tagging=None):
def add_one(self, f, object_name, bucket_name=None, tagging=None):
logging.debug('UP_OBJECT:', object_name)
try:
# config = TransferConfig()
GB = 1024 ** 3
config = TransferConfig(
multipart_threshold=1024 * 25,
max_concurrency=10,
multipart_chunksize=1024 * 25,
use_threads=True
multipart_threshold=5 * GB
)

self._s3.upload_fileobj(
Expand Down

0 comments on commit f1c6799

Please sign in to comment.