Skip to content

A service for taking a user uploaded file and breaking it into chunks and sequentially sending to the server

Notifications You must be signed in to change notification settings

glendaviesnz/rxjs-file-chunker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rxjs-file-chunker

An example of an rxjs service for taking a user uploaded file and breaking it into chunks and sequentially sending to the server

This is something I built for specific project, so is here as an example that could be taken and modified, rather than a generic uploader that could be used in any project.

The chunking and uploading service currently chunks the file into 1MB chunks, get a checksum for the file, and then uploads each chunk sequentially. There is a max concurrency setting which currently allows only 3 chunks at a time to upload and the others are queued. This is to prevent all the browsers http connections to a single domain to be maxed out with file uploads.

To run the example, in one terminal run:

node src/server.js

and in another terminal run

npm run start

About

A service for taking a user uploaded file and breaking it into chunks and sequentially sending to the server

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published