title: Sending videos from the client to the server
body: <p>I recently read about the File API which allows the client to use files from the file system in the website.</p>
  
  <p>I did all the stuff of adding the file input tag and reading the file and everything.</p>
  
  <p>I read the file as <code>ArrayBuffer</code> using a <code>FileReader</code> and used a <code>Uint8Array</code> view on it, then I send the view to the server.</p>
  
  <p>I tried it with txt, pdf and images and it worked fine. But when to use it with video files the computer lagged that and I didn't even wait and closed the browser!</p>
  
  <p>Here's <a href="https://codepen.io/Yousef-Essam/pen/dqoXqo?editors=1010" rel="nofollow noreferrer">the code</a></p>
  
  <p>Why did the lag happen with video files and is there a way to avoid it?!</p>