changed listdir
This commit is contained in:
parent
a91204745e
commit
7f7baa5f88
@ -154,7 +154,7 @@ def initial():
|
|||||||
# GET method for files
|
# GET method for files
|
||||||
@app.route("/server/<lang_id>", methods=["GET"])
|
@app.route("/server/<lang_id>", methods=["GET"])
|
||||||
def file_return(lang_id):
|
def file_return(lang_id):
|
||||||
extensions = dict(x.split(".") for x in os.listdir("F:/Programming Projects/SmearcarDB/files"))
|
extensions = dict(x.split(".") for x in os.listdir("files/"))
|
||||||
try:
|
try:
|
||||||
return send_file('files/' + lang_id+"."+extensions[str(lang_id)])
|
return send_file('files/' + lang_id+"."+extensions[str(lang_id)])
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user