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)