Skip to content

Commit f534e37

Browse files
committed
Fix download/upload files with the proper get_md5sum
1 parent 151a35b commit f534e37

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

qfieldcloud_sdk/sdk.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from requests.adapters import HTTPAdapter, Retry
1313

1414
from .interfaces import QfcException, QfcRequest, QfcRequestException
15-
from .utils import log
15+
from .utils import get_md5sum, log
1616

1717
logger = logging.getLogger(__file__)
1818

@@ -217,7 +217,7 @@ def upload_files(
217217
remote_file = f
218218
break
219219

220-
md5sum = self._get_md5sum(local_file["absolute_filename"])
220+
md5sum = get_md5sum(local_file["absolute_filename"])
221221
if remote_file and remote_file.get("md5sum", None) == md5sum:
222222
continue
223223

@@ -595,7 +595,7 @@ def download_file(
595595
"""
596596

597597
if remote_md5sum and local_filename.exists():
598-
if self._get_md5sum(str(local_filename)) == remote_md5sum:
598+
if get_md5sum(str(local_filename)) == remote_md5sum:
599599
if show_progress:
600600
print(
601601
f"{remote_filename}: Already present locally. Download skipped."

0 commit comments

Comments
 (0)