title: Play 2.x : Reactive file upload with Iteratees
body: <p>I will start with the question: <em>How to use Scala API's <code>Iteratee</code> to upload a file to the cloud storage</em> (Azure Blob Storage in my case, but I don't think it's most important now)</p>
  
  <p>Background:</p>
  
  <p>I need to chunk the input into blocks of about 1 MB for storing large media files (300 MB+) as an Azure's <code>BlockBlobs</code>. Unfortunately, my Scala knowledge is still poor (my project is Java based and the only use for Scala in it will be an Upload controller).</p>
  
  <p>I tried with this code: <a href="https://stackoverflow.com/questions/11468768">Why makes calling error or done in a BodyParser&#39;s Iteratee the request hang in Play Framework 2.0?</a> (as a <code>Input</code> <code>Iteratee</code>) - it works quite well but each<code>Element</code> that I could use has size of 8192 bytes, so it's too small for sending some hundred megabyte files to the cloud.</p>
  
  <p>I must say that's quite a new approach to me, and most probably I misunderstood something (don't want to tell that I misunderstood everything ;> )</p>
  
  <p>I will appreciate any hint or link, which will help me with that topic. If is there any sample of similar usage it would be the best option for me to get the idea.  </p>