Skip to content

Commit

Permalink
added iiif dir as path
Browse files Browse the repository at this point in the history
  • Loading branch information
BernhardKoschicek committed Sep 22, 2023
1 parent 9af959c commit af61a92
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion openatlas/views/file.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import subprocess
from pathlib import Path
from subprocess import call, run
from typing import Any, Union

Expand Down Expand Up @@ -73,7 +74,8 @@ def file_add(id_: int, view: str) -> Union[str, Response]:
@app.route('/file/iiif/<int:id_>', 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)
Expand Down

0 comments on commit af61a92

Please sign in to comment.