def download_pack(pid): pack = app.datamgr.get_pack_by_id(pid) if not pack: abort(400, "Unknown pack!") path = pack.get("filepath") filename = pack.get("filename") return static_file(path, root="/", download=filename)
def download_pack(pid): pack = app.datamgr.get_pack_by_id(pid) if not pack: abort(400, 'Unknown pack!') path = pack.get('filepath') filename = pack.get('filename') return static_file(path, root='/', download=filename)
def server_static(path): #print "Getting static files from", os.path.join(my_dir, 'htdocs'), path return static_file(path, root=os.path.join(bottle_dir, 'htdocs'))
def plugin_static(path): #print "Addr f", plugin_static, plugin_static.entry return static_file(path, root=os.path.join(m_dir, 'htdocs'))
def eue_media(media): user = checkauth() create_media(media) return static_file(media,root=media_path)