From af61a92321153c03cb4b54a145eb714d40477fcb Mon Sep 17 00:00:00 2001 From: BernhardKoschicek Date: Fri, 22 Sep 2023 10:09:50 +0200 Subject: [PATCH] added iiif dir as path --- openatlas/views/file.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/openatlas/views/file.py b/openatlas/views/file.py index 11b8352b3..a51605875 100644 --- a/openatlas/views/file.py +++ b/openatlas/views/file.py @@ -1,4 +1,5 @@ import subprocess +from pathlib import Path from subprocess import call, run from typing import Any, Union @@ -73,7 +74,8 @@ def file_add(id_: int, view: str) -> Union[str, Response]: @app.route('/file/iiif/', methods=['GET', 'POST']) @required_group('contributor') def make_iiif_available(id_: int): - command =f"convert {get_file_path(id_)} -define tiff:tile-geometry=256x256 -compress jpeg 'ptif:{app.config['IIIF_DIR'] / str(id_)}'" + + command =f"convert {get_file_path(id_)} -define tiff:tile-geometry=256x256 -compress jpeg 'ptif:{Path(app.config['IIIF_DIR']) / str(id_)}'" # call_ = call(f"convert {get_file_path(id_)} " # f"-define tiff:tile-geometry=256x256 -compress jpeg " # f"'ptif:{app.config['IIIF_DIR'] / str(id_)}'", shell=True)