1.1.0 • Published 5 years ago

@ivaniuk/tus-server v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

Tus node server with types and hooks

credits https://github.com/tus/tus-node-server

With express

import {TusServer, FileStore} from '@ivaniuk/tus-server';
import * as express from 'express';

const app = express();
const server = new TusServer<express.Request>({
    dataStore: new FileStore<express.Request>({
        directory: '/tmp/tus',
        expiration: 3600, // 1 hour
    }),
    maxSize: 50 * 1024 * 1024, // 50 MB
});

app.all('/uploads', server.handle)