1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-01 16:12:49 -05:00

return attachments from API

This commit is contained in:
Kyle Spearrin
2017-06-30 23:01:41 -04:00
parent 284078e946
commit 8ea81a74ae
10 changed files with 132 additions and 31 deletions

View File

@ -15,7 +15,7 @@ namespace Bit.Core.Services
public AzureAttachmentStorageService(
GlobalSettings globalSettings)
{
var storageAccount = CloudStorageAccount.Parse(globalSettings.Storage.ConnectionString);
var storageAccount = CloudStorageAccount.Parse(globalSettings.Attachment.ConnectionString);
_blobClient = storageAccount.CreateCloudBlobClient();
}
@ -38,7 +38,7 @@ namespace Bit.Core.Services
if(_attachmentsContainer == null)
{
_attachmentsContainer = _blobClient.GetContainerReference(AttchmentContainerName);
await _attachmentsContainer.CreateIfNotExistsAsync();
await _attachmentsContainer.CreateIfNotExistsAsync(BlobContainerPublicAccessType.Blob, null, null);
}
}
}