This project demonstrates:
- file split to constant size chunks
- transfer CBOR encoded chunks by WebSocket
- receive chunks and decode them
- concatenate chunks and save them to filesystem with same file name
$ npm install
$ npm run build
# run server (on ws://localhost:8081)
$ node server.js
# open page
$ open index.html
Buttons:
Choose file
- opens dialog window to choose fileUpload
- opens WS connection and sends file chunksClose connection
- closes WS connection
Server saves the file when total chunks size reaches original file size
- command - your command (100 by default)
- offset - offset from 0 byte of file
- data - actual file data chunk with 128 bytes length
- fileName - file name
- fileSize - total file size
- fileType - MIME type