Class LocalDiskTempFileStorageProvider

Represents local disk temporary file storage.

Inheritance
System.Object
LocalDiskTempFileStorageProvider
Implements
System.IDisposable
Namespace: Mediachase.FileUploader.Web
Assembly: Mediachase.FileUploader.dll
Version: 10.8.0
Syntax
public class LocalDiskTempFileStorageProvider : TempFileStorageProvider, IDisposable
Remarks

The LocalDiskTempFileStorageProvider class is derived from the TempFileStorageProvider and is the default emporary file storage provider for Mediachase FileUploader.Net. The LocalDiskTempFileStorageProvider class saves temporary file to folder.

Use tempStoragePath attribute to define temporary folder. Default value is ASP.NET temporary folder. Check that you have to set write rights for specified path for ASP.NET account. Following steps are required to set write rights for temp folder:

  • Open folder in Windows Explorer.
  • Right click folder and go to properties.
  • In properties dialog select Security tave and click Add.
  • Select ASPNET account and click Add.
  • Select aspnet_wp account (computername\ASPNET) account and the check Allow checkbox for read/write rights.
  • Clear all other Allow or check Deny boxes.
  • Accept changes and close dialog.

The following code example shows an example of an web.config file section with installed LocalDiskTempFileStorageProvider:

<tempFileStorage defaultProvider="McLocalDiskTempFileStorageProvider" enabled="true" timeout="60">
  <providers>
    <add name="McLocalDiskTempFileStorageProvider" 
         type="Mediachase.FileUploader.Web.LocalDiskTempFileStorageProvider, Mediachase.FileUploader" 
         description="" 
         tempStoragePath="%TEMP%" />
  </providers>
</tempFileStorage>

Constructors

LocalDiskTempFileStorageProvider()

Declaration
public LocalDiskTempFileStorageProvider()

Properties

TempStoragePath

Gets or sets the temp storage path.

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

The temp storage path.

Methods

CompleteStream(Guid)

Completes the stream.

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

The stream unique identifier.

Overrides

CreateStream(Guid, String, String, out Guid)

Creates the stream.

Declaration
public override 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
Overrides

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Declaration
public void Dispose()

GetFileStreamInfo(Guid)

Gets the stream info.

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

The stream uid.

Returns
Type Description
FileStreamInfo
Overrides

GetFileStreamInfos(Guid)

Gets the stream info.

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

The session uid.

Returns
Type Description
FileStreamInfo[]
Overrides

GetInfoFilePath(Guid)

Gets the info file local disk path.

Declaration
protected virtual string GetInfoFilePath(Guid StreamUid)
Parameters
Type Name Description
System.Guid StreamUid

The stream uid.

Returns
Type Description
System.String

GetLocalDiskPath(String)

Gets the local disk path.

Declaration
protected virtual string GetLocalDiskPath(string FileName)
Parameters
Type Name Description
System.String FileName

Name of the file.

Returns
Type Description
System.String

GetStream(Guid)

Gets the stream.

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

The stream uid.

Returns
Type Description
System.IO.Stream
Overrides

GetStreamFilePath(Guid)

Gets the stream file local disk path.

Declaration
protected virtual string GetStreamFilePath(Guid StreamUid)
Parameters
Type Name Description
System.Guid StreamUid

The stream uid.

Returns
Type Description
System.String

Initialize(String, NameValueCollection)

Initializes the specified name.

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

The name.

System.Collections.Specialized.NameValueCollection config

The config.

Overrides

ReleaseSession(Guid)

Releases the stream.

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

ReleaseStream(Guid)

Releases the stream.

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

The stream uid.

Overrides

SessionCache_GetItemList(Guid)

Sessions the cache_ get item list.

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

The session uid.

Returns
Type Description
FileStreamInfo[]

Implements

System.IDisposable