title: Dropbox partial upload
body: <p>I'm working on getting CI working with Xcode server, so that we can automatically push updates internally. Everything is working on Dropbox's end, except the fact that the IPA is only partially uploaded.</p>
  
  <p>It's not a large file - around 5.5mb. If I don't specify a "content-length", I get a 200, but it's not the complete file (around 2.7mb).</p>
  
  <p>When I specify a "Content-Length", it times out and I get a: <code>curl: (52) Empty reply from the server</code>.</p>
  
  <p>Here's part of my shell script:</p>
  
  <pre><code>DROPBOX_TOKEN="DROPBOX_TOKEN"
  FILE_LOCATION="folder/App.ipa"
  
  IPA="/path/to/IPA/App.ipa"
  IPA_SIZE=`ls -l $IPA | awk '{print $5}'`
  
  curl -i -X PUT "https://api-content.dropbox.com/1/files_put/auto/$FILE_LOCATION" \
  -d @"$IPA" \
  -H "Authorization: Bearer $DROPBOX_TOKEN" \
  -H "Content-Type: application/octet-stream" \
  -H "Content-Length: $IPA_SIZE"
  </code></pre>
  
  <p>I have confirmed that $IPA_SIZE (5473951 bytes) is equal to what I see in finder. </p>