diff options
author | Matthew Lemon <y@yulqen.org> | 2024-09-10 20:57:39 +0100 |
---|---|---|
committer | Matthew Lemon <y@yulqen.org> | 2024-09-10 20:57:39 +0100 |
commit | 5ff51cb986cf2bff5df59a10a65a1f1ecd593a64 (patch) | |
tree | ddc3460cf604743236dd8c15059d72fc90ed6469 | |
parent | aae0cf1636b64744ff037fb19cbc2f01dbbf9e23 (diff) |
Removed extraneous function
- _write_pdf_to_tempdir(), don't know why i put this in in the first
place
-rw-r--r-- | pyblackbird_cc/resources/views.py | 10 |
1 files changed, 0 insertions, 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. |