private BlobClient GetBlobReference(Guid fileId, string container, string fileName) { var filePath = AzureBlobFilePathBuilder.GetBlobReferenceWithFileId(fileId, fileName); var containerReference = _blobClient.GetBlobContainerClient(container); return(containerReference.GetBlobClient(filePath)); }
/// <summary> /// Creates a SAS download link to allow direct blob download /// </summary> /// <param name="fileId"></param> /// <param name="container"></param> /// <param name="fileName"></param> /// <param name="validForMinutes"></param> /// <param name="friendlyFileName">A filename to optionally use for the SAS download</param> /// <returns></returns> public Task <RepositoryResult <SasDownloadLink> > GetSasDownloadLinkAsync(Guid fileId, string container, string fileName, int validForMinutes = 5, string friendlyFileName = null) { var filePath = AzureBlobFilePathBuilder.GetBlobReferenceWithFileId(fileId, fileName); return(GetSasDownloadLinkInternalAsync(filePath, container, validForMinutes, friendlyFileName)); }