I am just wondering, If I have a file which is just 2MB for example. Will it uses the whole 4MB chunk or will it just use 2 MB?
我只是想知道,如果我有一个只有2MB的文件。它会使用整个4MB的块还是仅使用2 MB?
I uploaded a 33MB Picture to the stroage, is that divided into 4MB chunks?
我上传了一张33MB的图片到了stroage,是不是分为4MB块?
Thanks
1 个解决方案
#1
As you know, a block blob in Azure can be of 200GB in size however you can only upload a blob up to 64 MB without breaking it into chunks. Any blob bigger than 64 MB must be broken into chunks and then these chunks should be uploaded. Any file less than 64 MB can also be uploaded by breaking into chunks as well. However the maximum size of the chunk can be 4MB. Please note that this is the maximum size. Minimum size of the chunk would be 1 Byte and you can pick any number between 1 Byte and 4 MB to be your chunk size.
如您所知,Azure中的块blob大小可以为200GB,但是您只能上传高达64 MB的blob而不会将其分成块。任何大于64 MB的blob都必须分成块,然后才能上传这些块。任何小于64 MB的文件也可以通过分成块来上传。但是块的最大大小可以是4MB。请注意,这是最大尺寸。块的最小大小为1字节,您可以选择1字节和4 MB之间的任何数字作为块大小。
Now if you're uploading a 2 MB file, you can decide to upload it without breaking into chunk or can upload it by breaking into chunks. Since the file size is 2 MB, the maximum size of the chunk in this case would be 2 MB (i.e. you're uploading the file by breaking it into 1 chunk of 2 MB size).
现在,如果您正在上传一个2 MB的文件,您可以决定上传它而不会分成块或者可以通过分组来上传它。由于文件大小为2 MB,因此在这种情况下块的最大大小将为2 MB(即,您通过将文件分成1个2 MB大小的块来上载文件)。
If you're uploading a 33 MB file, again if you have good Internet connectivity you can upload that file without breaking it into chunk because its size is less than 64 MB limit but it would be better if you split it into chunks. Now assuming you decided to break this file into chunks for 4 MB each, then in that case there will be 9 chunks. 8 chunks would be of 4 MB each and the last chunk would be of 1 MB (4 MB * 8 + 1 MB * 1 = 33 MB).
如果你正在上传一个33 MB的文件,如果你有良好的互联网连接,你可以上传该文件,而不会将其分成大块,因为它的大小小于64 MB限制,但如果将它分成块,会更好。现在假设您决定将此文件分成每个4 MB的块,那么在这种情况下将有9个块。 8个块每个4 MB,最后一个块将是1 MB(4 MB * 8 + 1 MB * 1 = 33 MB)。