mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
Replaced send_from_directory by send_file to simplify the code
This commit is contained in:
parent
1e6fa5f8eb
commit
0142ac3ca2
1 changed files with 1 additions and 3 deletions
|
@ -116,9 +116,7 @@ def allroutes(path):
|
|||
if devMode:
|
||||
print("Sending file '%s - %s'" % (directory, path))
|
||||
|
||||
path = os.path.basename(fullpath)
|
||||
directory = os.path.dirname(fullpath)
|
||||
return flask.send_from_directory(directory, path)
|
||||
return flask.send_file(fullpath, conditional=True)
|
||||
|
||||
except Exception as error:
|
||||
if devMode:
|
||||
|
|
Loading…
Reference in a new issue