mirror of
https://github.com/FAUSheppy/tmnf-replay-server.git
synced 2026-09-19 11:49:58 +02:00
fix: returen correct replay from db-name
This commit is contained in:
@@ -623,7 +623,13 @@ def downloads(filename):
|
||||
abort(404)
|
||||
|
||||
print(f"Sending {filename}")
|
||||
return send_from_directory("uploads/", filename)
|
||||
|
||||
replay = db.session.query(ParsedReplay).filter(ParsedReplay.filehash==filename).first()
|
||||
|
||||
return send_from_directory("uploads/",
|
||||
filename,
|
||||
as_attachment=True,
|
||||
download_name=os.path.basename(replay.filepath))
|
||||
|
||||
def create_app():
|
||||
|
||||
|
||||
Reference in New Issue
Block a user