Validate a chat attachment (DM/group file/gif) and return (filename, mime).
(file_storage)
| 17289 | resp = Response(gen, mimetype=mime) |
| 17290 | resp.headers["Content-Disposition"] = f'attachment; filename="{filename}"' |
| 17291 | else: |
| 17292 | from flask import send_file |
| 17293 | resp = send_file( |
| 17294 | sp, |
| 17295 | mimetype=mime, |
| 17296 | as_attachment=True, |
| 17297 | download_name=filename, |
| 17298 | conditional=True, |
no test coverage detected