[fix] Increase chunk size to 15 mb while uploading file to dropbox (#4492)
This commit is contained in:
parent
8e6d72e6ef
commit
af0d0972aa
1 changed files with 3 additions and 1 deletions
|
|
@ -145,8 +145,10 @@ def upload_from_folder(path, dropbox_folder, dropbox_client, did_not_upload, err
|
|||
error_log.append(frappe.get_traceback())
|
||||
|
||||
def upload_file_to_dropbox(filename, folder, dropbox_client):
|
||||
"""upload files with chunk of 15 mb to reduce session append calls"""
|
||||
|
||||
create_folder_if_not_exists(folder, dropbox_client)
|
||||
chunk_size = 4 * 1024 * 1024
|
||||
chunk_size = 15 * 1024 * 1024
|
||||
file_size = os.path.getsize(encode(filename))
|
||||
mode = (dropbox.files.WriteMode.overwrite)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue