【发布时间】:2020-05-17 21:04:31
【问题描述】:
我有此代码用于将单个文件发送到用户端:
客户端:
@app.route('/image, methods = ['GET','POST'])
def image():
# CU.close()
SqlPicPlace="SELECT ImgData FROM tablename WHERE ImgSaveID=2 "
CU.execute(SqlPicPlace)
ans=CU.fetchone()
imgBinary = ans[0]
return send_file( io.BytesIO(imgBinary), attachment_filename='a.jpg', mimetype='image/jpg' ,as_attachment=True )
但我想发送超过 1 个文件发送到用户端。我能怎么做?
【问题讨论】:
-
这能回答你的问题吗? Download multiple CSVs using Flask?