Compare commits
1 Commits
6beb6e20d7
...
6353d1a6c2
Author | SHA1 | Date | |
---|---|---|---|
6353d1a6c2 |
|
@ -154,7 +154,7 @@ def delete_file():
|
||||||
try:
|
try:
|
||||||
os.remove(os.path.join(app.config.get("UPLOAD_DIR"), filename))
|
os.remove(os.path.join(app.config.get("UPLOAD_DIR"), filename))
|
||||||
db.execute("DELETE FROM uploads WHERE filename = ?", (filename,))
|
db.execute("DELETE FROM uploads WHERE filename = ?", (filename,))
|
||||||
con.commit()
|
db.commit()
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
return "Error: File not found."
|
return "Error: File not found."
|
||||||
return "Success"
|
return "Success"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user