November Happy Hour will be moved to Thursday December 5th.

Class FileBlobProvider

A BlobProvider implementation that serves blobs from files in a file system.

Inheritance
System.Object
FileBlobProvider
Namespace: EPiServer.Framework.Blobs
Assembly: EPiServer.Framework.dll
Version: 9.12.2
Syntax
public class FileBlobProvider : BlobProvider

Constructors

FileBlobProvider()

Create a new FileBlobProvider and sets the repository path to the [appDataPath]\blobs directory.

Declaration
public FileBlobProvider()

FileBlobProvider(String)

Create a new FileBlobProvider with a specific repository path.

Declaration
public FileBlobProvider(string path)
Parameters
Type Name Description
System.String path

Properties

Path

Path to blob repository

Declaration
public string Path { get; set; }
Property Value
Type Description
System.String

Methods

CreateBlob(Uri, String)

Create a reference to a new blob

Declaration
public override Blob CreateBlob(Uri id, string extension)
Parameters
Type Name Description
System.Uri id

The identifier of the container

System.String extension

The extention (such as .png)

Returns
Type Description
Blob

A reference to a blob

Overrides

Delete(Uri)

Delete a blob or a container

Declaration
public override void Delete(Uri id)
Parameters
Type Name Description
System.Uri id

The identifier of a blob or a blob container

Overrides
Remarks

The Host part of the identifier is the container and the path is the file/blob that is being deleted. If the file is missing it is assumed that the container is being deleted.

GetBlob(Uri)

Get a reference to a blob

Declaration
public override Blob GetBlob(Uri id)
Parameters
Type Name Description
System.Uri id

The identifier

Returns
Type Description
Blob

A reference to a blob

Overrides
Remarks

This method will always return a reference even though the actual blob does not exists

Initialize(String, NameValueCollection)

Initialize the FileBlobProvider

Declaration
public override void Initialize(string name, NameValueCollection config)
Parameters
Type Name Description
System.String name

Name of the provider

System.Collections.Specialized.NameValueCollection config

provider settings

Extension Methods