Replaced send_from_directory by send_file to simplify the code
This commit is contained in:
parent
1e6fa5f8eb
commit
0142ac3ca2
@ -116,9 +116,7 @@ def allroutes(path):
|
|||||||
if devMode:
|
if devMode:
|
||||||
print("Sending file '%s - %s'" % (directory, path))
|
print("Sending file '%s - %s'" % (directory, path))
|
||||||
|
|
||||||
path = os.path.basename(fullpath)
|
return flask.send_file(fullpath, conditional=True)
|
||||||
directory = os.path.dirname(fullpath)
|
|
||||||
return flask.send_from_directory(directory, path)
|
|
||||||
|
|
||||||
except Exception as error:
|
except Exception as error:
|
||||||
if devMode:
|
if devMode:
|
||||||
|
Loading…
Reference in New Issue
Block a user