Class TempFileStorageProvider

Provides a common base class for all temp file storage providers, and a way for developers to implement custom temporary file storage providers that can be used with the Mediachase FileUploader.NET infrastructure as persistent stores for temporary file.

Inheritance
System.Object
TempFileStorageProvider
Namespace: Mediachase.FileUploader.Web
Assembly: Mediachase.FileUploader.dll
Version: 10.8.0
Syntax
public abstract class TempFileStorageProvider : ProviderBase

Constructors

TempFileStorageProvider()

Initializes a new instance of the TempFileStorageProvider class.

Declaration
public TempFileStorageProvider()

Methods

CompleteStream(Guid)

Completes the stream.

Declaration
public abstract void CompleteStream(Guid StreamUid)
Parameters
Type Name Description
System.Guid StreamUid

The stream unique identifier.

CreateStream(Guid, String, String, out Guid)

Creates a new temporary file stream.

Declaration
public abstract Stream CreateStream(Guid SessionUid, string FileName, string ContentType, out Guid StreamUid)
Parameters
Type Name Description
System.Guid SessionUid

The session uid.

System.String FileName

Name of the file.

System.String ContentType

Type of the content.

System.Guid StreamUid

The stream unique identifier.

Returns
Type Description
System.IO.Stream

GetFileStreamInfo(Guid)

Gets the stream information by StreamUid.

Declaration
public abstract FileStreamInfo GetFileStreamInfo(Guid StreamUid)
Parameters
Type Name Description
System.Guid StreamUid

The stream uid.

Returns
Type Description
FileStreamInfo

GetFileStreamInfos(Guid)

Gets the stream information list by SessionUid.

Declaration
public abstract FileStreamInfo[] GetFileStreamInfos(Guid SessionUid)
Parameters
Type Name Description
System.Guid SessionUid

The session uid.

Returns
Type Description
FileStreamInfo[]

GetStream(Guid)

Gets the stream by StreamUid.

Declaration
public abstract Stream GetStream(Guid StreamUid)
Parameters
Type Name Description
System.Guid StreamUid

The stream uid.

Returns
Type Description
System.IO.Stream

Initialize(String, NameValueCollection)

Initializes the provider.

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

The friendly name of the provider.

System.Collections.Specialized.NameValueCollection config

A collection of the name/value pairs representing the provider-specific attributes specified in the configuration for this provider.

Exceptions
Type Condition
System.ArgumentNullException

The name of the provider is null.

System.InvalidOperationException

An attempt is made to call System.Configuration.Provider.ProviderBase.Initialize(System.String,System.Collections.Specialized.NameValueCollection) on a provider after the provider has already been initialized.

System.ArgumentException

The name of the provider has a length of zero.

ReleaseSession(Guid)

Releases the session.

Declaration
public abstract void ReleaseSession(Guid SessionUid)
Parameters
Type Name Description
System.Guid SessionUid

The session uid.

ReleaseStream(Guid)

Releases the stream.

Declaration
public abstract void ReleaseStream(Guid StreamUid)
Parameters
Type Name Description
System.Guid StreamUid

The stream uid.