Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the Difference between GetBlobReference and GetBlobReferenceFromServer?

Tags:

Im trying to save some images to azure blob storage and there are 2 method to get reference of a blob GetBlobReference and GetBlobreferenceFromServer but I could not find the difference between the two.

Is There any difference between the two?

like image 670
Parv Sharma Avatar asked Aug 05 '13 08:08

Parv Sharma


1 Answers

There're a few differences:

  1. GetBlobReference is in the older version of storage client library (Microsoft.WindowsAzure.StorageClient) while GetBlobReferenceFromServer is in the newer version of the storage client library (Microsoft.WindowsAzure.Storage.Blob).
  2. More importantly, GetBlobReference just gives you a reference to the blob. It won't tell you the type of the blob (Block or Page) where as GetBlobReferenceFromServer will tell you the blob type or in other words GetBlobReference will not make a round trip to the server where as GetBlobReferenceFromServer will.
  3. Because GetBlobReferenceFromServer method makes a server roundtrip, the blob must be present in the storage. If you invoke this method on a non-existing blob, the method will throw an error.
like image 139
Gaurav Mantri Avatar answered Sep 24 '22 09:09

Gaurav Mantri