Skip to content

Commit

Permalink
allow anonymous uploads
Browse files Browse the repository at this point in the history
  • Loading branch information
mam10eks committed Dec 2, 2024
1 parent f94ae8c commit 858ea2e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion application/src/tira_app/endpoints/vm_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -534,8 +534,9 @@ def anonymous_upload(request, dataset_id):
uploaded_file = request.FILES["file"]
upload_id = str(uuid.uuid4())

result_dir = tempfile.TemporaryDirectory(prefix="tira-upload", delete=False).name
result_dir = tempfile.TemporaryDirectory(prefix="tira-upload").name
result_dir = Path(result_dir)
result_dir.mkdir(parents=True, exist_ok=True)

with open(result_dir / "upload.zip", "wb+") as destination:
for chunk in uploaded_file.chunks():
Expand Down

0 comments on commit 858ea2e

Please sign in to comment.