4.0.0 • Published 6 years ago

rear-service v4.0.0

Weekly downloads
2
License
MIT
Repository
-
Last release
6 years ago

rear-service

Require

  • node: ^6.0.0

Install

npm install --save rear-service

Usage

const service = require('rear-service);
const fs = require('fs');
const mdf = require('md5file-with-progressbar');

let filePath = '/Users/anyone/Downloads/book.pdf';
let stat = fs.statSync(filePath);

let m = new mdf(filePath);
m.on('complete', v => {
    service.preprocessing('1234567890000000', 0, 'book.pdf', stat.size, v, '/test', 'http://localhost:1349/part/init').then(d =>{
        console.log(d);
    }).catch(err => {
        console.log(err);
    });
});
m.start();

Demo

{ Found: false,
  Data:
   { UploadID: 250,
     UserID: 'anyone',
     ParentID: 0,
     FileSize: 154458151,
     BlockSize: 26214400,
     FilePath: '/test',
     FileName: 'book.pdf',
     ServerID: '2~ATI4p1UiWUJ-DYh9axizQ7z01hhfSLy',
     Category: 4,
     FileEtag: 'SoPOeZTqz37W3Phywg1pJw==',
     CurrentCount: 0,
     PartCount: 6,
     CreatedBy: 'anyone',
     CreatedOn: 1532424801,
     UpdatedOn: 1532424801 } }

License

this project uses SATA license (The Star And Thank Author License),anyway,you should star this repo before use.

4.0.0

6 years ago

3.0.0

6 years ago

2.0.2

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago