Return (safe_filename, ext, normalized_mime) for an uploaded file.
(file_storage, default_name: str = "file")
| 17270 | conn.close() |
| 17271 | if not row or row["owner"] != owner: |
| 17272 | abort(404) |
| 17273 | sp = row["stored_path"] |
| 17274 | if not sp or not os.path.exists(sp): |
| 17275 | abort(404) |
| 17276 | |
| 17277 | try: |
| 17278 | filename = aesgcm_decrypt_text(row["filename_enc"]) |
| 17279 | except Exception: |
| 17280 | filename = "attachment" |
| 17281 | try: |
| 17282 | mime = aesgcm_decrypt_text(row["mime_enc"]) |
| 17283 | except Exception: |
no test coverage detected