/game/getfile")
+def getfile(lang_code):
gamepath = request.args.get("gamepath")
- manualname = request.args.get("manual")
- manual = requests.get(host_endpoint + '/getmanual', json=gamepath)
- return Response(manual, mimetype="application/pdf",
+ filepath = request.args.get("filepath")
+ filepath_enc = base64.b64encode(filepath.encode('utf-8')).decode()
+ jsonbody = {'nfopath': gamepath, 'filepath': filepath_enc}
+ print(gamepath, filepath)
+ file = requests.get(host_endpoint + '/getfile', json=jsonbody)
+ return Response(file, mimetype="application/pdf",
headers={
"Content-Disposition":
- "attachment;filename=" + str(manualname)})
+ "attachment;filename=" + str(filepath)})
diff --git a/site/templates/game.html b/site/templates/game.html
index 52a7267..303cd55 100644
--- a/site/templates/game.html
+++ b/site/templates/game.html
@@ -15,11 +15,15 @@
{{part}}
{% endfor %}
{{lang_game_manual}}
- {% if 'manual' in game.game %}
- {{lang_game_get_manual}}
+ {% if game.game.documents %}
+ {% for document in game.game.documents %}
+ {% if document.type == 'manual' %}
+ {{lang_game_get_manual}} {{document.path}}
+ {% endif %}
+ {% endfor %}
{% else %}
{{lang_game_manual_not_found}}
- {% endif%}
+ {% endif %}
{{lang_game_download_header}}
{{lang_game_download_ingress}}