Return a verified absolute path for report attachments, else None.
(stored_path: str)
| 17336 | conn.close() |
| 17337 | try: |
| 17338 | if sp and os.path.exists(sp): |
| 17339 | os.remove(sp) |
| 17340 | except Exception: |
| 17341 | pass |
| 17342 | flash("Attachment deleted.") |
| 17343 | return redirect(url_for("profiler")) |
| 17344 | |
| 17345 | # --------------------------- |
| 17346 | # Admin browse user files |
| 17347 | # --------------------------- |
| 17348 | @app.route("/admin/files/<username>") |
| 17349 | @login_required |
| 17350 | def admin_user_files(username: str): |
| 17351 | """admin_user_files. |
| 17352 | |
| 17353 | Admin-only route handler. |
| 17354 | |
| 17355 | This docstring was expanded to make future maintenance easier. |
| 17356 | |
| 17357 | Args: |
no outgoing calls
no test coverage detected