Skip to content
Snippets Groups Projects
Commit fcec07d2 authored by felixwelter's avatar felixwelter
Browse files

Replace fix number with dynamic value during path building

parent 618e37c3
No related branches found
No related tags found
No related merge requests found
......@@ -55,7 +55,7 @@ def query():
query = request.form.get("term")
context = request.form.get("context")
result = index.search(query, context)
img_name = result["path"][7:] + "_" + str(result["page"]) + ".jpg"
img_name = result["path"][len(SLIDE_DIR):] + "_" + str(result["page"]) + ".jpg"
return jsonify({
"type": "image",
"path": os.getenv('EXTERNAL_HOST', '<PLEASE_SET_EXTERNAL_HOST_ENV_VAR>') + "/slide/" + img_name
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment