Return the relative path to the media file on disk for the given URL.
(self, url)
| 39 | return path.startswith(self.base_url.path) and not self.base_url.netloc |
| 40 | |
| 41 | def file_path(self, url): |
| 42 | """ |
| 43 | Return the relative path to the media file on disk for the given URL. |
| 44 | """ |
| 45 | relative_url = url.removeprefix(self.base_url.path) |
| 46 | return url2pathname(relative_url) |
| 47 | |
| 48 | def serve(self, request): |
| 49 | """Serve the request path.""" |