Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用原生ajax通过formdata完成文件上传,并实时监控上传进度 | zhaoolee的博客 #11

Open
zhaoolee opened this issue Jul 5, 2019 · 0 comments

Comments

@zhaoolee
Copy link
Owner

zhaoolee commented Jul 5, 2019

https://zhaoolee.github.io/GBlog/2019/07/01/ajax-formdata/#more

在ajax1.0时代, 是无法直接上传文件的, 到了ajax2.0时代, 新增了FormData, 我们就可以用FormData完成文件的上传 以前我们用form表单中的<input type="file"/>实现文件上传, 但前端无法实时查看上传的进度, 而ajax2.0可以让我们实时监控上传进度 下面是一个原生js使用ajax 完成 FormData上传文

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant