code: def getUrlFromFilename(self, filename):
          
          components = util.splitpath(util.getRelativePath(self.basepath, filename))
          url = '/'.join([url_quote(component, '') for component in components])
          return self.baseurl + url
docs: Construct URL from filename.