pub fn filename_from_url(url: &str) -> StringExpand description
Derive a filename from the final path segment of a URL. Query strings
and fragments are stripped. Returns "attachment" if nothing sensible
can be extracted (e.g. the URL has no path beyond the host).