feat: upload - deel 03.02 - Skipp all toegevoegd
This commit is contained in:
Binary file not shown.
@@ -140,8 +140,9 @@ class FilesystemAdapter:
|
||||
"modified": self.modified_iso(path),
|
||||
}
|
||||
|
||||
def write_uploaded_file(self, path: Path, file_stream, chunk_size: int = 1024 * 1024) -> dict:
|
||||
with path.open("xb") as handle:
|
||||
def write_uploaded_file(self, path: Path, file_stream, chunk_size: int = 1024 * 1024, overwrite: bool = False) -> dict:
|
||||
mode = "wb" if overwrite else "xb"
|
||||
with path.open(mode) as handle:
|
||||
while True:
|
||||
chunk = file_stream.read(chunk_size)
|
||||
if not chunk:
|
||||
|
||||
Reference in New Issue
Block a user