title: How to add multimedia attachment file to Couchbase Lite in an efficient way?
body: <p>I am working on Sencha Touch APP and trying to add video file into Couchbase lite using XMLHttpRequest.PUT.</p>
  
  <p>Had tried standalone  and inline attachment as given in <a href="https://wiki.apache.org/couchdb/HTTP_Document_API#Standalone_Attachments" rel="nofollow">here</a> and <a href="http://developer.couchbase.com/documentation/mobile/1.2/develop/references/couchbase-lite/rest-api/document/put---db---doc---attachment-/index.html" rel="nofollow">here</a>.</p>
  
  <p><strong><em>Issue with Standalone_Attachments:</em></strong>
  It creates two revisions, one while creating doc and one after adding associated attachment to it. So it is getting sync twice with server. </p>
  
  <p><strong><em>Issue with Inline_Attachments:</em></strong>
  It creates just one revision as attachment content is added inline while creating doc. But application is crashing while trying to add video file of 5mb and more. It uses Base64 which increase attachment size by 33%.  </p>
  
  <p><strong>What is the better way of adding attachment to document?</strong></p>