diff --git a/modal/network_file_system.py b/modal/network_file_system.py index ddf46c832..4a0e753f1 100644 --- a/modal/network_file_system.py +++ b/modal/network_file_system.py @@ -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()