Class FileUploaderContext

Represent file uploader context.

Inheritance
System.Object
FileUploaderContext
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Mediachase.FileUploader
Assembly: Mediachase.FileUploader.dll
Version: 10.8.0
Syntax
public class FileUploaderContext

Properties

Current

Gets or sets the current.

Declaration
public static FileUploaderContext Current { get; }
Property Value
Type Description
FileUploaderContext

The current.

HttpFileMaxSize

Gets the size of the HTTP file max.

Declaration
public static int HttpFileMaxSize { get; }
Property Value
Type Description
System.Int32

The size of the HTTP file max.

HttpPostBufferSize

Gets a 64-bit integer that represents the buffer size in bytes, which Mediachase FileUploader will use to process request. You can change this value for better optimization.

Declaration
public static int HttpPostBufferSize { get; }
Property Value
Type Description
System.Int32

The default value is 655360 bytes.

HttpPostMaxSize

Gets the size of the HTTP post max.

Declaration
public static int HttpPostMaxSize { get; }
Property Value
Type Description
System.Int32

The size of the HTTP post max.

ProgressUid

Gets or sets the progress uid.

Declaration
public Guid ProgressUid { get; set; }
Property Value
Type Description
System.Guid

The progress uid.

SessionType

Gets or sets the type of the session.

Declaration
public FileUploaderSessionType SessionType { get; set; }
Property Value
Type Description
FileUploaderSessionType

The type of the session.

SessionUid

Gets the session uid.

Declaration
public Guid SessionUid { get; set; }
Property Value
Type Description
System.Guid

The session uid.

SessionUidKey

Gets the session uid query string key.

Declaration
public static string SessionUidKey { get; }
Property Value
Type Description
System.String

The session uid key.

TempFileStorageProvider

Gets the provider.

Declaration
public TempFileStorageProvider TempFileStorageProvider { get; set; }
Property Value
Type Description
TempFileStorageProvider

The provider.

TempFileStorageProviderKey

Gets the temp file storage provider query string key.

Declaration
public static string TempFileStorageProviderKey { get; }
Property Value
Type Description
System.String

The temp file storage provider key.

Methods

CheckUrlIsAllowed(String)

Checks the URL is allowed.

Declaration
public static bool CheckUrlIsAllowed(string requestPath)
Parameters
Type Name Description
System.String requestPath

The request path.

Returns
Type Description
System.Boolean

PatternMatch(String, String)

Validate the source string with the specific mask.

Declaration
public static bool PatternMatch(string Source, string Mask)
Parameters
Type Name Description
System.String Source

The string to validate.

System.String Mask

The mask expression.

Returns
Type Description
System.Boolean

true if the Source string are valid; otherwise, false.

Remarks

The static PatternMatch method allow you to validate your string with the specific mask.

The PatternMatch mask expression allows you to use two basic character types: literal (normal) text characters and metacharacters. Metacharacters used to ? and * characters.

?Match any simbol
*Zero or more matches
Examples

The following code illustrates the use of the PatternMatch method.

bool bRet1 = McHttpModule.PatternMatch("text","*");		// return true
bool bRet1 = McHttpModule.PatternMatch("text","*e?t");	// return true
bool bRet1 = McHttpModule.PatternMatch("text","*exx");	// return false
bool bRet1 = McHttpModule.PatternMatch("text","t?et");	// return true
bool bRet1 = McHttpModule.PatternMatch("text","??e?");	// return false
bool bRet1 = McHttpModule.PatternMatch("text","t*t*");	// return true