refactor(core): add a single filesystem path to URL resolver
Three independent implementations mapped a filesystem path to a URL. They now
delegate to PublicUrlResolver and keep their signatures.
This also fixes pathToUrl(): it diffed the path segments against the root ones,
so /upload/app/photo.jpg under the /var/www/app root silently lost the app
directory. Paths outside of the base path now resolve to an empty string
instead of a mangled URL.
delegate to PublicUrlResolver and keep their signatures.
This also fixes pathToUrl(): it diffed the path segments against the root ones,
so /upload/app/photo.jpg under the /var/www/app root silently lost the app
directory. Paths outside of the base path now resolve to an empty string
instead of a mangled URL.