0.0.4-alpha • Published 5 years ago
@zujo/socket-file-uploader v0.0.4-alpha
@zujo/Socket-File-Uploader
Socket server library for File Upload with Multiple files Resume, Pause, cancel feature, over socket.io.
Installation
npm install @zujo/socket-file-uploader --save
Usage
const uploader = require('@zujo/socket-file-uploader');
io.on("connection", function(socket){
var upload = new uploader(socket);
upload.uploadPath = __dirname + '/files/';
});
Steps
Import package from node modules.
const uploader = require('@zujo/socket-file-uploader');
Provide socket to a new instance of a class(uploader) as a arguments.
var upload = new uploader(socket);
Provide a destination directory Path, where you want to save the uploaded files.
upload.uploadPath = '_path_of_directory_';
All set..!
Features
Resumable file uploading
Multiple file uploading supported
Cancel uploading
Authors and acknowledgment
Thanks and credits
Mayank Pandav, Chintan Rajpara