Skip to content

Commit

Permalink
lambda
Browse files Browse the repository at this point in the history
  • Loading branch information
kramstrom committed Jul 12, 2024
1 parent 941b08f commit 909b4e3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modal/network_file_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,8 @@ async def write_file(self, remote_path: str, fp: BinaryIO, progress_cb: Callable
If remote_path ends with `/` it's assumed to be a directory and the
file will be uploaded with its current name to that directory.
"""
progress_cb = progress_cb or (lambda *_, **__: None)

sha_hash = get_sha256_hex(fp)
fp.seek(0, os.SEEK_END)
data_size = fp.tell()
Expand Down

0 comments on commit 909b4e3

Please sign in to comment.