Skip to main content

filename_from_url

Function filename_from_url 

Source
pub fn filename_from_url(url: &str) -> String
Expand 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).