There are multiuploader files with the progress of the number of downloaded files .. i.e. The 1st file out of 5 was loaded - it was shown .. The 2nd file was loaded - it was shown and so on. BUT, when files weigh 10 MB or more, progress for a long time stands at zero.

And now: how to make the display of the number of bytes sent to the server of each file?

Is it even possible to get (learn) on the client only what, for example, 300kb from 10 megabyte file was sent and display it immediately?

Or how else can you ??

Simply, if the server is third-party .. then it will be impossible to implement the logic of splitting the file in parts and gluing it on the server ..

    1 answer 1

    If you want to do this all on the client, here are the useful links: https://stackoverflow.com/questions/21698055/input-file-upload-success

    https://learn.javascript.ru/xhr-onprogress

    If you want to notify the client about the processes on the server, you will have to use sockets or other crutches. You can use a formidable and a socket, like in the example: https://stackoverflow.com/questions/5323291/node-formidable-and-a-simple-progress-bar You can use the on file event to create a successful transfer event for the whole file:

    var fileCounter = 0; form.on('file', function (field, file) { if (file.size > 0) { fileCounter++; fs.rename(file.path, form.uploadDir + "/" + req.user.id + ".jpg"); io.sockets.emit('fileUpload', 'file uploaded ' + fileCounter); } }); 

    Also, if you notify a specific client, you need to provide an authentication mechanism, since by default a server will not see which particular connection to send a notification to. Then it is necessary to store session (user) data in the intermediate database of authentication sessions, you can also store the current sockets id of this client in the same place.

    • In your case, I would try to do everything on the client and would not climb on a server. - larrymacbarry