From 5ff51cb986cf2bff5df59a10a65a1f1ecd593a64 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Tue, 10 Sep 2024 20:57:39 +0100 Subject: Removed extraneous function - _write_pdf_to_tempdir(), don't know why i put this in in the first place --- pyblackbird_cc/resources/views.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/pyblackbird_cc/resources/views.py b/pyblackbird_cc/resources/views.py index e95c676..c23efa9 100644 --- a/pyblackbird_cc/resources/views.py +++ b/pyblackbird_cc/resources/views.py @@ -147,16 +147,6 @@ def index(request): return render(request, "resources/resource_list.html", context) -def _write_pdf_to_tempdir(f) -> str: - temp_dir = tempfile.mkdtemp() - file_path = os.path.join(temp_dir, f.name) - - with open(file_path, "wb") as destination: - for chunk in f.chunks(): - destination.write(chunk) - return file_path - - def create_metadata(pdf_files) -> Generator[tuple[services.PDFMetadata, str], None, None]: """ Generates PDF metadata and snapshot images for a list of PDF files. -- cgit v1.2.3