Replaced send_from_directory by send_file to simplify the code

This commit is contained in:
evandrocoan 2020-06-19 10:10:08 -03:00
parent 1e6fa5f8eb
commit 0142ac3ca2

View File

@ -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: