GithubHelp home page GithubHelp logo

uploaddemo's Introduction

使用方法:

  • npm install, 安装所有的依赖
  • npm run start启动服务,并自动打开浏览器

注意:node的版本要>=7.6, 因为里面使用了async和await语法,目前node的LTS版本已经是8.9.0,所以请各位放心使用

详细的原理和步骤,请参见文章:Node+H5实现大文件分片上传

uploaddemo's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

uploaddemo's Issues

上传比较大的zip文件包,concat后的zip文件无法解压

我使用这个demo上传一个稍微大的zip文件(120m),上传完了一切正常,但是在手工解压这个zip文件的时候,mac提示:无法将“xxx.zip”解压缩到“uploads”,(错误2-无此文件或目录。)
上传后的文件大小看起来是正常的,但就是无法解压,估计是文件有损坏?
另外,使用了unzip进行解压,提示:
ERROR 36590 nodejs.Z_DATA_ERRORError: invalid stored block lengths (uncaughtException throw 1 times on pid:36590) at InflateRaw.zlibOnError (zlib.js:152:15) errno: -3 code: 'Z_DATA_ERROR' name: 'Z_DATA_ERRORError'

你好,使用你的DEMO,文件可以正常上传,但是上传完成后合并的文件是0字节

我这边的环境是node v8.9.3 npm 5.6.0 成功运行后上传文件可以分割上传,但是无法合并文件,请问我这边出问题的可能情况是?

$ node upload.js
服务启动完成,端口监听5000!
nodeServer\uploads\cb9665bbf1999e8e513b8df8fb71be88
cb9665bbf1999e8e513b8df8fb71be88 疯狂Java讲义 第3版 PDF电子书下载 带书签目录 完整版.pdf
(node:13744) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Cannot read property 'length' of undefin
ed
(node:13744) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled wi
ll terminate the Node.js process with a non-zero exit code.

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.