We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 64509f4 commit cfd4985Copy full SHA for cfd4985
app.py
@@ -2,7 +2,7 @@
2
import json
3
import os
4
5
-from flask import Flask, request
+from flask import Flask, request, send_file
6
7
app = Flask(__name__)
8
app.config["UPLOAD_FOLDER"] = os.getenv("UPLOAD_FOLDER", "/usr/share/nginx/html")
@@ -37,6 +37,13 @@ def save():
37
return filename
38
39
40
+# This route should be used for debugging filestore locally.
41
+
42
+@app.route("/static/<string:path>")
43
+def serve(path):
44
+ return send_file(os.path.join(app.config["UPLOAD_FOLDER"], path))
45
46
47
if __name__ == "__main__":
48
port = int(os.getenv("FILESTORE_PORT", "7910"))
49
app.run(use_debugger=True, use_reloader=True, port=port, host="0.0.0.0")
0 commit comments