Giter Club home page Giter Club logo

upload-file's Introduction

大文件上传切片+断点续传+秒传

功能要求

  • 校验文件格式
  • 要有进度条提示
  • 可以上传超大的视频文件(切片)
  • 上传期间断网后,再次联网可以继续上传(断点续传)
  • 上传过同一个文件后,再次上传直接提示上传完成(秒传)

前后端分工

前端

  1. 文件格式校验
  2. 文件切片、md5计算
  3. 发起检查请求,把当前文件的hash发送给服务端,检查是否有相同hash的文件
  4. 上传进度计算
  5. 上传完成后通知后端合并切片

后端

  1. 检查接收到的hash是否有相同的文件,并通知前端当前hash是否有未完成的上传
  2. 接收切片
  3. 合并所有切片

Reference

upload-file's People

Contributors

zlx01 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.