MCPcopy Create free account
hub / github.com/dedsec1121fk/DedSec / tools_delete_screenshot

Function tools_delete_screenshot

Scripts/Developer Base/Free Internet.py:1314–1322  ·  view source on GitHub ↗
(filename: str)

Source from the content-addressed store, hash-verified

1312
1313@app.route("/tools/screenshot/delete/<path:filename>", methods=["POST"])
1314def tools_delete_screenshot(filename: str):
1315 path = (SCREENSHOT_DIR / filename).resolve()
1316 if path.parent == SCREENSHOT_DIR.resolve() and path.exists():
1317 try:
1318 path.unlink()
1319 flash("Screenshot deleted.")
1320 except Exception:
1321 flash("Could not delete screenshot.")
1322 return redirect(url_for("tools_home"))
1323
1324# ---------------- routes: browser
1325# ---------------- routes: browser ----------------

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected