Getting null value for Azure blob last modified property

后端 未结 2 1362
终归单人心
终归单人心 2021-01-15 12:48

I\'m getting null when I\'m trying to fetch LastModified property of Azure Blob, below is the snippet for the same.

Cl         


        
2条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-15 13:03

    For those who use a newer version of CloudBlockBlob and FetchAttributes does not exist – use DownloadAttributes instead.

    CloudBlockBlob blockBlob = container.GetBlockBlobReference(blob.ToString());
    blockBlob.DownloadAttributes();
    var timemodified = blockBlob.Properties.LastModified;
    

提交回复
热议问题