Employee Achievement | Arjun Nilecoreview
What if the file is large and the network is slow? What if the transfer fails in between? Well, well, will the user have to wait till the transfer is complete? And will he get any indication of how long it will take to complete? If it takes too long, is it possible to cancel in between?
Getting over these challenges, I decided to upload the files by splitting them into chunks. With chunking, it was possible to track the progress and display it in the progress bar.
Sometimes, the user is not able to proceed till the file is fully uploaded. In that case, I upload chunks synchronously, hold any further events from the user and display a progress bar about status. You have to wait, when you have to, no choice.
However, when it is possible to do something else, it is better to upload the chunks in the background and display the status in the sidebar, allowing the user to proceed with other tasks.
The obvious is not the right choice always, isn’t it?