title: Serve file using Google Cloud Storage does not retrieve the mime type
body: <p>I am storing a file in Google App Engine using Google Cloud Storage. The file is loaded fine but the serve returns a file interpreted as a binary not as the original mime type. You'll find hereafter the code. Has anyone an idea of what is happening ?</p>
  
  <h2>I. Store file</h2>
  
  <pre><code>GSFileOptionsBuilder optionsBuilder = new GSFileOptionsBuilder()
  .setBucket(BUCKET_NAME)
  .setKey(objectId)
  .setAcl("project-private")
  .setMimeType(mimeType)
  .setContentDisposition("attachment;filename "+item.getName());
  </code></pre>
  
  <h2>II. Serve file</h2>
  
  <p>blobKey = blobstoreService.createGsBlobKey("/gs/"+BUCKET_NAME+"/"+ fileName); </p>
  
  <p>blobstoreService.serve(blobKey, resp);</p>
  
  <h2>III. Difference with serving a file in the blobstore</h2>
  
  <p>I had a piece of code which used to work. The problem is that apparently the BlobInfo object is only for objects stored in the blobstore and not in the Google Cloud Storage</p>
  
  <pre><code>BlobInfo blobInfo = blobInfoFactory.loadBlobInfo(blobKey); 
  resp.setContentLength(new Long(blobInfo.getSize()).intValue()); 
  resp.setHeader("content-type", blobInfo.getContentType()); 
  resp.setHeader("content-disposition", "attachment; filename=" + 
  blobInfo.getFilename()); 
          blobstoreService.serve(blobKey, resp);  
  </code></pre>
  
  <p>Any help is very welcome !</p>
  
  <p>Thanks,</p>
  
  <p>Hugues</p>