Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to limit the size of an azure blob container?

In my application, a web service send a shared access signature (write rights on container) to the client so it can upload files.

Is there any way to limit the size (1Gb for instance) of uploaded content ? The ideal solution would be a custom size limit on the container. Otherwise it could be a limit on the shared access signature.

I could also change my application to send a share access signature on individual blobs if the feature is available on blobs.

like image 401
Guillaume Avatar asked Nov 09 '11 14:11

Guillaume


People also ask

How do you size a blob container?

In azure portal ,you can see Usage under Blob Service blade. Open the blob container, select properties under Settings, then click on the Calculate Size button which gives size for each type of blob and also total size of the container.

What is blob storage limit in Azure?

Only limit is the 500 TB storage account capacity. Max size of a single blob container, table, or queue. 500 TB. Max number of blocks in a block blob or append blob.


2 Answers

Windows Azure does not provide limit per container. The limit provided by Windows Azure is by storage account (100 TB/account) and by individual blob (200 GB max. for a block blob and 1 TB max. for a page blob). For your requirement, I think you would need to implement this limit in your application.

like image 199
Gaurav Mantri Avatar answered Oct 04 '22 20:10

Gaurav Mantri


The concept of trusting the client over the date size to be sent is pretty dangerous, especially for a service that bills depending on the size of the data transferred and stored.

The client could be a public HTML website. Any user who could leak the SAS by calling your service, would be able to send an enormous file.

I think the SAS should specify the maximum size of data that can be read, of written, for a given container / BLOB.

like image 39
Adrien Constant Avatar answered Oct 04 '22 20:10

Adrien Constant