问题
First, how to upload a file to blob root? It seems I have to upload file to a container (which is a folder IMO)
Second, if I finally found a way to upload file to root, will default.html page (or other name) become the default page for the domain?
Thanks.
回答1:
There is a container named: $root. Refer to 'Working with the Root Container' for further info
AFAIK, blob storage cannot be used as a simple web server, so it cannot serve default.html. You will need a web role instance for this.Windows Azure Web, Worker, and VM roles demystified
回答2:
There's a special container name, $root
, that you use for writing to the root container. See this MSDN article for more information about this root container.
While you can store static web content in blob storage, there's no concept of a default object; that is, you can't have something like default.html be served when a visiter heads over to www.YourStaticSite.com. They'd need to visit www.YourStaticSite.com/default.html.
EDIT: As @SantiagoIT mentioned, you need to host your default page somewhere (such as a Web Role). Since you can move static content to blob storage (e.g. css, javascript, images, and static html), this will reduce the load on your Web Role instances (since requests to blob storage go directly to blob storage, bypassing your Web Role instances altogether). Even if your website is hosted on-premises, you could take advantage of blob storage, yielding the same advantages.
Going one step further: once content is in blob storage, you can choose to activate the CDN (edge cache). For frequently-accessed content, this could yield a performance gain for your end-users.
回答3:
Others have noted the $root container and also that there is currently no concept of a default blob.
I agree that it would be super useful to suport a default blob for each container including the root container.
I have an open feature request on this. http://feedback.azure.com/forums/217298-storage/suggestions/1180039-support-a-default-blob-for-blob-storage-containers#comments
回答4:
One of the motivations to add $root folder to blob storage was to support Silverlight's clientaccesspolicy.xml file as explained in MSDN documentation
来源:https://stackoverflow.com/questions/8639484/howto-upload-setup-default-html-page-for-azure-blob-storage