mirror of
https://github.com/mealie-recipes/mealie.git
synced 2026-05-26 11:40:27 -04:00
fix: use unique temp filename for migration archive uploads
This commit is contained in:
@@ -179,7 +179,7 @@ def validate_file_token(token: str | None = None) -> Path:
|
|||||||
@contextmanager
|
@contextmanager
|
||||||
def get_temporary_zip_path(auto_unlink=True) -> Generator[Path, None, None]:
|
def get_temporary_zip_path(auto_unlink=True) -> Generator[Path, None, None]:
|
||||||
app_dirs.TEMP_DIR.mkdir(exist_ok=True, parents=True)
|
app_dirs.TEMP_DIR.mkdir(exist_ok=True, parents=True)
|
||||||
temp_path = app_dirs.TEMP_DIR.joinpath("my_zip_archive.zip")
|
temp_path = app_dirs.TEMP_DIR / f"{uuid4().hex}.zip"
|
||||||
try:
|
try:
|
||||||
yield temp_path
|
yield temp_path
|
||||||
finally:
|
finally:
|
||||||
|
|||||||
Reference in New Issue
Block a user