mirror of
https://github.com/jackeilles/xygt.git
synced 2024-11-21 22:32:39 +01:00
fix secure_filename error
This commit is contained in:
parent
b390ff1e54
commit
a0df4b0c23
1 changed files with 1 additions and 1 deletions
|
@ -64,7 +64,7 @@ def getData(id):
|
||||||
if Config.files.find_one({"id": id}) is not None:
|
if Config.files.find_one({"id": id}) is not None:
|
||||||
data = Config.files.find_one({"id": id})
|
data = Config.files.find_one({"id": id})
|
||||||
|
|
||||||
with open(secure_filename(os.path.join(Config.fileDir, id)), "rb") as f:
|
with open(os.path.join(Config.fileDir, secure_filename(id)), "rb") as f:
|
||||||
file = f.read()
|
file = f.read()
|
||||||
|
|
||||||
# Get MIME type from file, if fails then use magic
|
# Get MIME type from file, if fails then use magic
|
||||||
|
|
Loading…
Reference in a new issue