难道Windows Azure的Blob存储支持服务融为一体pressed文件类似于Amazon S3吗? [英] Does Windows Azure Blob Storage support serving compressed files similar to Amazon S3?

查看:152
本文介绍了难道Windows Azure的Blob存储支持服务融为一体pressed文件类似于Amazon S3吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

例如,亚马逊S3,有一个约定,如果您有bundle.js'和'bundle.js.gz上传到服务器和客户端请求bundle.js'文件'接受编码:gzip压缩'头,亚马逊的S3将服务于COM $ P $该文件的pssed版本(bundle.js.gz'而不是'bundle.js')

For example, at Amazon S3, there is a convention, if you have both 'bundle.js' and 'bundle.js.gz' uploaded to the server, and a client requests for 'bundle.js' file with 'Accept-Encoding: gzip' header, Amazon S3 will serve the compressed version of this file ('bundle.js.gz' instead of 'bundle.js').

难道Windows Azure的存储支持呢?如果不是,有什么解决方法?

Does Windows Azure Storage support this? If not, what are workarounds?

推荐答案

Azure存储允许您定义在一个blob 内容编码属性。对于COM pressed的内容,你可以将此属性设置为 GZIP 当这个内容提供服务浏览器,它会自动DECOM presses的内容和节目在uncom pressed内容。

Azure Storage allows you to define Content-Encoding property on a blob. For compressed content, you could set this property to be GZIP and when this content is served by a browser, it automatically decompresses the content and shows the uncompressed content.

这是比亚马逊S3有些不同,你确实需要上传2个文件。在这里,您将只能上传一个文件(bundle.js在你的例子),这是COM pressed并具有内容编码设置为 GZIP

This is a bit different than Amazon S3 though where you actually have to upload 2 files. Here you will only upload one file (bundle.js in your example) which is compressed and has content-encoding set as GZIP.

这篇关于难道Windows Azure的Blob存储支持服务融为一体pressed文件类似于Amazon S3吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆