https://medium.com/swlh/upload-video-in-chunks-with-preview-and-progress-bar-using-javascript-5eb95745f9c5