Awesome Open Source
Awesome Open Source

Build Status codecov Coverage Status Language grade: JavaScript Known Vulnerabilities Greenkeeper badge


Browser to node.js chunked uploader

This module has three components:

  • A server side express middleware to receive chunks
  • A client module which can be used in both nodejs or the browser
  • A ui component to be used in the browser

In order to see a working sample:

npm install
npm run build
npm run server

Open your browser in http://localhost:3000/index.html

In order to use chunk-upload in your project run:

npm i -S @mediagoom/chunk-upload


After installing in your express server add:

const uploader  = require('@mediagoom/chunk-upload');

const app = express();

app.use('/upload', uploader({base_path: <destination> + '/'}));

//this is called at the end of the upload
    app.put('/upload/:id?', (req, res) => {
        //the file path



To use the client module use:

import {UploadManager} from '@mediagoom/chunk-upload/lib';

To use the client ui module use:

import {build} from '@mediagoom/chunk-upload/lib/ui';

To use the client css:

npm i -D sass

If you use webpack in your webpack.config.js

const sass = require('node-sass');
const readFileSync = require('fs').readFileSync;

function svg_inline(value)
    const val = value.getValue();
    const path = path.resolve('./assets', val);
    const content = readFileSync(path);

    return new sass.types.String('url("data:image/svg+xml;base64,' + content.toString('base64') + '")');


            test: /\.scss$/
                ,use: [
                    , { loader: 'sass-loader'
                        , options: {
                            functions: {
                                'svg-load($value1)' : svg_inline

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
Javascript (1,539,019
Upload (892
Upload File (197
Chunk Upload (8
Upload Server (7
Related Projects