java Google云存储、blobstoreService、gzip压缩
我有一个appengine服务,可以从云存储下载文件。 我通过appengine处理特定的访问权限。 所以我使用blobstoreService来提供文件:
blobstoreService.serve(blobstoreService.createGsBlobKey("bucket" + "filepath"))
我想利用浏览器的解压功能。所以我在gzip文件上设置了元数据“Content Encoding:gzip”。但当我通过appengine下载文件时,元数据不会被考虑,文件也不会被解压缩。 如果我使用云存储api,头被正确设置,文件被浏览器解压缩
有没有办法让blobstoreService起作用
# 1 楼答案
我认为谷歌存储无法压缩或解压对象。 https://cloud.google.com/storage/docs/xml-api/reference-headers?csw=1#contentencoding