示例7: _convert_file_to_url ▲点赞 1▼ def_convert_file_to_url(filename, remote_storage=False):url = [settings.SENDFILE_URL]ifremote_storage: url.insert(1, filename)returnescape_uri_path(u'/'.join(url))else: relpath = os.path.relpath(filename, settings.SENDFILE_ROOT)whilerelpath: ...