api.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:lama 作者: CSE-POST 项目源码 文件源码
def web_remote_file():
    remote_path = request.args.get('path')
    if not remote_path:
        return "No remote path given."
    local_path, name = get_remote_file(remote_path)
    if not local_path:
        return "Remote file '{}' not found.".format(remote_path)
    res = send_from_directory(local_path, name, as_attachment=True)
    shutil.rmtree(local_path)
    return res

# ########################################################################### #
#                                API Part                                     #
# ########################################################################### #
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号