Path.GetFileName() and it didn't work correctly all of the time. IIRC, it would preserve any garbage data like query parameters after the end of the filename, so instead of http://example.com/image.png?width=420&height=69 producing image.png, it would produce image.png?width=420&height=69? It's been a hot second so I don't remember if this was the exact problem.