All Projects → umbraco-community → Umbracofilesystemproviders.azure

umbraco-community / Umbracofilesystemproviders.azure

Licence: other
☁️ An Azure Blob Storage IFileSystem provider for Umbraco

Projects that are alternatives of or similar to Umbracofilesystemproviders.azure

Pins
Pin, Discover and Share Resources
Stars: ✭ 149 (+58.51%)
Mutual labels:  azure, storage
King.Azure.Imaging
Image API & processing for Azure Web Apps
Stars: ✭ 20 (-78.72%)
Mutual labels:  nuget, azure
Azurlshortener
An simple and easy Url Shortener
Stars: ✭ 247 (+162.77%)
Mutual labels:  azure, storage
BlobHelper
BlobHelper is a common, consistent storage interface for Microsoft Azure, Amazon S3, Komodo, Kvpbase, and local filesystem written in C#.
Stars: ✭ 23 (-75.53%)
Mutual labels:  storage, nuget
Storage
💿 Storage abstractions with implementations for .NET/.NET Standard
Stars: ✭ 380 (+304.26%)
Mutual labels:  azure, storage
Baget
A lightweight NuGet and symbol server
Stars: ✭ 1,861 (+1879.79%)
Mutual labels:  azure, nuget
OpenSleigh
OpenSleigh is a Saga management library for .NET Core.
Stars: ✭ 198 (+110.64%)
Mutual labels:  nuget, azure
Foundatio
Pluggable foundation blocks for building distributed apps.
Stars: ✭ 1,365 (+1352.13%)
Mutual labels:  azure, storage
Cosmonaut
🌐 A supercharged Azure CosmosDB .NET SDK with ORM support
Stars: ✭ 309 (+228.72%)
Mutual labels:  azure, storage
Naos
A mildly opiniated modern cloud service architecture blueprint + reference implementation
Stars: ✭ 19 (-79.79%)
Mutual labels:  storage, azure
AzureServicesForUnity
Accessing Azure services (App Service, Table Storage, CosmosDB with Table API, Event Hubs) from a Unity game
Stars: ✭ 52 (-44.68%)
Mutual labels:  storage, azure
Hexa
Hexa: The ultimate companion for Azure. Setup and deploy in seconds
Stars: ✭ 56 (-40.43%)
Mutual labels:  azure, storage
Azure.data.wrappers
Azure Storage Simplified
Stars: ✭ 34 (-63.83%)
Mutual labels:  azure, storage
Xxamarin
Repositório com ✨ 141 Exemplos de Implementações e 📦 13 Pacotes de Xamarin
Stars: ✭ 68 (-27.66%)
Mutual labels:  azure, nuget
Azurestorageexplorer
☁💾 Manage your Azure Storage blobs, tables, queues and file shares from this simple and intuitive web application.
Stars: ✭ 88 (-6.38%)
Mutual labels:  azure
Now Storage
Use Now static deployments to upload and store files.
Stars: ✭ 91 (-3.19%)
Mutual labels:  storage
Storj
Ongoing Storj v3 development. Decentralized cloud object storage that is affordable, easy to use, private, and secure.
Stars: ✭ 1,278 (+1259.57%)
Mutual labels:  storage
Go Storage
An application-oriented unified storage layer for Golang.
Stars: ✭ 87 (-7.45%)
Mutual labels:  storage
Device Simulation Dotnet
IoT Simulation service
Stars: ✭ 93 (-1.06%)
Mutual labels:  azure
Csi Test
CSI test frameworks
Stars: ✭ 90 (-4.26%)
Mutual labels:  storage

UmbracoFileSystemProviders.Azure v2

This version is for Umbraco v8 only. For the v1 package for Umbraco v7 please visit the develop branch

Image Alt

Build status

An Azure Blob Storage IFileSystem provider for Umbraco Used to offload static files in the media section to the cloud.

This package allows the storage and retrieval of media items using Azure Blob Storage while retaining the relative paths to the files expected in the back office.

v2 requires Umbraco v8.1.0+

Installation

Both NuGet and Umbraco packages are available. If you use NuGet but would like the benefit of the Umbraco configuration wizard you can install the Umbraco package first, use the wizard, then install the NuGet package, the configuration will be maintained.

From v2.0.0-alpha3 onwards this package was split into 2 NuGet packages and an additional one was added to support Umbraco Forms. When using NuGet install the UmbracoFileSystemProviders.Azure.Media package to swap Media storage to Blobs.

If upgrading from v2.0.0-alpha1 or v2.0.0-alpha2 to v2.0.0-alpha3 you will need to install UmbracoFileSystemProviders.Azure.Media

NuGet Packages Version
Release Core NuGet download
Release Media NuGet download
Release Forms NuGet download
Bleeding edge Core MyGet download
Bleeding edge Media MyGet download
Bleeding edge Forms MyGet download
Umbraco Packages
Release Our Umbraco project page
Bleeding edge AppVeyor Artifacts

Manual build

If you prefer, you can compile UmbracoFileSystemProviders.Azure yourself, you'll need:

  • Visual Studio 2019 (or above)

To clone it locally click the "Clone in Windows" button above or run the following git commands.

git clone https://github.com/umbraco-community/UmbracoFileSystemProviders.Azure
cd UmbracoFileSystemProviders.Azure
.\build.cmd

In the interim code reviews and pull requests would be most welcome!

Media

Configuration via Web.Config

In Web.config create the new application keys

<add key="AzureBlobFileSystem.ConnectionString:media" value="DefaultEndpointsProtocol=https;AccountName=[myAccountName];AccountKey=[myAccountKey]" />
<add key="AzureBlobFileSystem.ContainerName:media" value="media" />
<add key="AzureBlobFileSystem.RootUrl:media" value="https://[myAccountName].blob.core.windows.net/" />
<add key="AzureBlobFileSystem.MaxDays:media" value="365" />
<add key="AzureBlobFileSystem.UseDefaultRoute:media" value="true" />
<add key="AzureBlobFileSystem.UsePrivateContainer:media" value="false" />

Additionally the provider can be further configured with the following application setting in the web.config.

<?xml version="1.0"?>
<configuration>
  <appSettings>
    <!--Disables the built in Virtual Path Provider which allows for relative paths-->
    <add key="AzureBlobFileSystem.DisableVirtualPathProvider" value="true" />
    <!--
      Enables the development mode for testing. Addition changes to the FileSystemProviders.config are also required
    -->
    <add key="AzureBlobFileSystem.UseStorageEmulator" value="true" />
  </appSettings>
</configuration>

Virtual Path Provider

By default the plugin will serve files transparently from your domain or serve media directly from Azure. This is made possible by using a custom Virtual Path Provider included and automatically initialised upon application startup. This can be disabled by adding the configuration setting noted above.

Note: Virtual Path Providers may affect performance/caching depending on your setup as the process differs from IIS's unmanaged handler. Virtual files sent via the provider though are correctly cached in the browser so this shouldn't be an issue. VPP providers also don't work with Precompiled sites or when used in a virtual directory/application.

The following configuration is required in your web.config to enable static file mapping in IIS Express.

<?xml version="1.0"?>
  <configuration>
    <location path="Media">
      <system.webServer>
        <handlers>
          <remove name="StaticFileHandler" />
          <add name="StaticFileHandler" path="*" verb="*" preCondition="integratedMode" type="System.Web.StaticFileHandler" />
        </handlers>
      </system.webServer>
    </location>
  </configuration>

Also add this configuration to the web.config inside the Media folder

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
	<system.webServer>
		<handlers>
			<clear />
			<add name="StaticFileHandler" path="*" verb="*" preCondition="integratedMode" type="System.Web.StaticFileHandler" />
			<add name="StaticFile" path="*" verb="*" modules="StaticFileModule,DefaultDocumentModule,DirectoryListingModule" resourceType="Either" requireAccess="Read" />
		</handlers>
	</system.webServer>
</configuration>

Combining with ImageProcessor

ImageProcessor.Web contains a IImageService called CloudImageService, to enable that service and pull images directly from the cloud replace the CloudImageServicesetting with the following:

<?xml version="1.0"?>
<security>
  <services>
    <service name="LocalFileImageService" type="ImageProcessor.Web.Services.LocalFileImageService, ImageProcessor.Web"/>
    <service prefix="media/" name="CloudImageService" type="ImageProcessor.Web.Services.CloudImageService, ImageProcessor.Web">
      <settings>
        <setting key="Container" value="media"/>
        <setting key="MaxBytes" value="8194304"/>
        <setting key="Timeout" value="30000"/>
        <setting key="Host" value="https://[myAccountName].blob.core.windows.net/"/>
      </settings>
    </service>
  </services>  
</security>

Note The CloudImageServiceis not compatible with the FileSystemProvider when using private storage. You can instead use the AzureImageService which is included with the AzureBlobCache package

Optionally install the AzureBlobCache plugin to get the most out of the package.

Umbraco Forms

Currently this package is available only via NuGet

Install-Package UmbracoFileSystemProviders.Azure.Forms

Configuration via Web.Config

In Web.config update the new application keys with the required credentials

<add key="AzureBlobFileSystem.ContainerName:forms" value="forms-data" />
<add key="AzureBlobFileSystem.RootUrl:forms" value="https://[myAccountName].blob.core.windows.net/" />
<add key="AzureBlobFileSystem.ConnectionString:forms" value="DefaultEndpointsProtocol=https;AccountName=[myAccountName];AccountKey=[myAccountKey]" />
<add key="AzureBlobFileSystem.UsePrivateContainer:forms" value="false" />

Warning

The Azure Blob container cannot be called forms as this will give unexpected behaviour, and we recommend you call it form-data or similar.

Authors

  • James Jackson-South
  • Dirk Seefeld
  • Lars-Erik Aabech
  • Jeavon Leopold

Thanks

  • Elijah Glover for writing the Umbraco S3 Provider which provided inspiration and some snazzy unit testing code for this project.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].