title: Downloading an item from the sitecore media library
body: <p>I'm having a problem allowing users to download items from the Sitecore media library, specifically.</p>
  
  <p>I have a link to a media item (xls, pdf etc) on a page, when a user clicks on the page the file should be downloaded.  </p>
  
  <p>This works fine on our test sitecore instance, but when we try it on our live instance, the file starts to download OK but then seems to be truncated.  (both instances are located on the same IIS server)</p>
  
  <p>Using Fiddler, I can see that the downloads response body is truncated at 784kb. </p>
  
  <pre><code>HTTP/1.1 200 OK
  Cache-Control: public, max-age=604800
  Content-Type: application/vnd.ms-excel
  Expires: Fri, 25 Mar 2011 14:12:48 GMT
  Last-Modified: Fri, 18 Mar 2011 11:17:45 GMT
  ETag: 050b2f8a408b47c49fefbe28b5ec9661
  Server: Microsoft-IIS/6.0
  X-Powered-By: ASP.NET; Sitecore CMS
  X-Powered-By: ASP.NET
  Content-Disposition: attachment; filename="Filename.xls"
  Date: Fri, 18 Mar 2011 14:12:48 GMT
  Content-Length: 804795
  </code></pre>
  
  <p>(the file is actually 5019136kb!)</p>
  
  <p>IF any body can shed any light, I'd be eternally grateful!</p>
  
  <p>Yours in desperation!</p>
  
  <p>Pete</p>
  
  <p>--UPDATE--</p>
  
  <p>Think I might be getting closer to the cause of this.</p>
  
  <p>By closer examination of the response I'm getting back from the server </p>
  
  <p>Response denied by WatchGuard HTTP proxy. 
  Reason: chunk-size line too large line='‰u¯^%|\x0c\x04‡V–\x15ÿ\x00¾c*?Jã5]cW×o[R×5K›Ë‡ûóÝÎÒ;}Y‰&amp;«Q]4èQ¥ðE/D‘ÅW\x13ˆ®ïRn^­¿Ì(¢ŠÔÄ(¢Š\x00(¢Š\x00(¢Š\x00(¢¾…ý•?àœ¿\x1bi\x19' </p>
  
  <p>Mystery 1 Solved - The reason it was working on the test site was because I wasn't going via the proxy server!</p>
  
  <p>Mystery 2 - Why is the chunk size too large!!!!?</p>
  
  <p>Pete</p>