Skip to content
This repository has been archived by the owner on Feb 3, 2020. It is now read-only.

Softeq/cloudstorage.extension

Repository files navigation

Azure DevOps builds NuGet

Cloud Storage Extensions

Cloud Storage Extensions provide high level abstraction of Azure Cloud storage.

Get started

  1. Register package
            builder.Register(x =>
                {
                    var context = x.Resolve<IComponentContext>();
                    var config = context.Resolve<IConfiguration>();
                    return new AzureCloudStorage(config[ConnectionString]);
                })
                .As<IContentStorage>();
  1. Configure storage
            builder.Register(x =>
            {
                var context = x.Resolve<IComponentContext>();
                var config = context.Resolve<IConfiguration>();
                var cfg = new AzureStorageConfiguration(
                    config[ContentStorageHost],
                    config[MessageAttachmentsContainer],
                    config[MemberAvatarsContainer],
                    config[ChannelImagesContainer],
                    config[TempContainerName],
                    Convert.ToInt32(config[MessagePhotoSize]));
                return cfg;

            }).AsSelf();
  1. appsettings.json section
  "AzureStorage": {
    "ConnectionString": "[connection string to azure storage]",
    "ContentStorageHost": "[content storage host]",
    "MessageAttachmentsContainer": "message",
    "MemberAvatarsContainer": "avatar",
    "ChannelImagesContainer": "channel",
    "TempContainerName": "temp",
    "MessagePhotoSize": 300
  }

About

This project is maintained by Softeq Development Corp. We specialize in .NET core applications.

Contributing

We welcome any contributions.

License

Cloud Storage Extensions project is available for free use, as described by the LICENSE (MIT).