[英]Python Flask-Uploads Get Upload status/progress bar
I am trying to create a form and upload a file using Flask.我正在尝试使用 Flask 创建表单并上传文件。 The current code that I have saves the file successfully to my local server, but I do not have a way to find the upload status, if I upload a large file.
我当前的代码成功地将文件保存到我的本地服务器,但是如果我上传一个大文件,我无法找到上传状态。 I am planning to change the code to use Flask-Uploads, but the documentation does not mention anything about upload status which I could use to update my progress bar.
我计划更改代码以使用 Flask-Uploads,但文档没有提及任何关于我可以用来更新进度条的上传状态。
The entire app is made in Dash.整个应用程序是用 Dash 制作的。 The current code is as follows:
当前代码如下:
UPLOAD_FOLDER = os.get_cwd()
if request.method == 'POST':
file = request.files['file']
filename = file.filename
file.save(os.path.join(UPLOAD_FOLDER, filename))
Is it at all possible to get file upload status using flask only?是否可以仅使用 flask 获取文件上传状态? I cannot use JQuery solutions at the moment.
我目前无法使用 JQuery 解决方案。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.