def get_filename(self, filename, filesystem=False, convert=False, subpath=''):
        from uliweb.utils.common import safe_unicode
        
        #make sure the filename is unicode
        s = settings.GLOBAL
        if convert:
            _p, _f = os.path.split(filename)
            _filename = os.path.join(_p, self.filename_convert(_f))
        else:
            _filename = filename
        nfile = safe_unicode(_filename, s.HTMLPAGE_ENCODING)

        if subpath:
            paths = [application_path(self.to_path), subpath, nfile]
        else:
            paths = [application_path(self.to_path), nfile]
        f = os.path.normpath(os.path.join(*paths)).replace('\\', '/')
    
        if filesystem:
            return files.encode_filename(f, to_encoding=s.FILESYSTEM_ENCODING)
        return f
Get the filename according to self.to_path, and if filesystem is False
dataset/ETHPy150Open limodou/uliweb/uliweb/contrib/upload/__init__.py/FileServing.get_filename