Skip to content

a guide about how to upload large file (using plain javascript for frond-end and back-end)

License

Notifications You must be signed in to change notification settings

peijunpeng166/file-upload

 
 

Repository files navigation

前端大文件上传 + 断点续传解决方案

English

推荐使用 Nodejs14

重新演示上传需要删除 /target 中的文件,否则由于服务端保存了文件上传会直接成功

示例大文件下载:https://v0c98mphqw.feishu.cn/file/boxcnZ34jCyQziXxsS9NaV0zfre

前端

  • Vue@2
  • Element-ui
  • Blob#slice 实现文件切片
  • FileReader + WebWorker + spark-md5 生成文件 hash
  • xhr 发送 formData

服务端

  • Nodejs@14
  • multiparty 处理 formData

start

npm install
npm run start

相关博客

字节跳动面试官:请你实现一个大文件上传和断点续传

About

a guide about how to upload large file (using plain javascript for frond-end and back-end)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Vue 52.6%
  • JavaScript 44.1%
  • HTML 3.3%