I'm trying to use the .on('progress', cb) method for listening the progress of file upload.But smothing worng hapend when I pass different type param to the .attach.The progrss is fine when pass the file path, but event.percent shows 100% and it took minutes before uploading to server when pass Buffer.
I'm trying to use the .on('progress', cb) method for listening the progress of file upload.But smothing worng hapend when I pass different type param to the .attach.The progrss is fine when pass the file path, but event.percent shows 100% and it took minutes before uploading to server when pass Buffer.
Relevant versions:
Pass a file path: (the file total size is 82.3MB)
result:
The loaded is increase slowly。When loaded = totalSize,upload action is finished。
Pass Buffer
result
The loaded increase so fask. Loaded = totalSize and it took minutes before uploading to server.