SarweshKumarTiwari / custom_upload

1 stars 1 forks source link

File Uploading

This project is about uploading large files from client.

Uploading via chunks

In this method , A file is divided into multiple chunks and then uploaded one by one by using blob.slice().

Blob.slice(begin,end) // this returns a blob of given size

handling upload

When chunks are send with request then we append the incoming chunks in a file.

fs.promises.appendFile(filePath,blob) //appends chunk to initialized file

Initializing

git clone https://github.com/SarweshKumarTiwari/custom_upload.git

Install dependencies

npm install