2024-04-20 12:46:00 发布
网友
默认情况下,send_from_directory函数似乎将提供给它的路径作为其项目目录的相对路径。我们如何才能提供一条通往它的绝对路径?在
@app.route('/download/<file>',methods=['GET']) def download_function(file): return send_from_directory("~/Desktop", file, as_attachment=True)
目前没有回答
目前没有回答
相关问题 更多 >
编程相关推荐