clean server storage on start

This commit is contained in:
Joel Mathew Thomas
2025-03-20 22:11:22 +05:30
parent fd92bdd22b
commit 1b523b1611
+2
View File
@@ -1,4 +1,5 @@
import os
import shutil
import uuid
import zipfile
from django.http import FileResponse, HttpResponse
@@ -18,6 +19,7 @@ from freqsplit.input.format_checker import is_supported_format
UPLOAD_DIR = "/tmp/freqsplit"
# Ensure the temp directory exists
shutil.rmtree(UPLOAD_DIR)
os.makedirs(UPLOAD_DIR, exist_ok=True)
# Endpoint to ping server