C# Class RockWeb.FileUploader

Handles retrieving file data from storage
Inheritance: IHttpHandler, IRequiresSessionState
Show file Open project: CentralAZ/Rockit-CentralAZ

Public Methods

Method Description
GetFileBytes ( HttpContext context, System.Web.HttpPostedFile uploadedFile ) : byte[]

Gets the file bytes

ProcessRequest ( HttpContext context ) : void

Enables processing of HTTP Web requests by a custom HttpHandler that implements the T:System.Web.IHttpHandler interface.

ValidateFileType ( HttpContext context, System.Web.HttpPostedFile uploadedFile ) : void

Validates the type of the file.

Private Methods

Method Description
ProcessBinaryFile ( HttpContext context, System.Web.HttpPostedFile uploadedFile ) : void

Processes the binary file.

ProcessContentFile ( HttpContext context, System.Web.HttpPostedFile uploadedFile ) : void

Processes the content file.

Method Details

GetFileBytes() public method

Gets the file bytes
public GetFileBytes ( HttpContext context, System.Web.HttpPostedFile uploadedFile ) : byte[]
context System.Web.HttpContext The context.
uploadedFile System.Web.HttpPostedFile The uploaded file.
return byte[]

ProcessRequest() public method

Enables processing of HTTP Web requests by a custom HttpHandler that implements the T:System.Web.IHttpHandler interface.
Must be logged in
public ProcessRequest ( HttpContext context ) : void
context System.Web.HttpContext An object that provides references to the intrinsic server objects (for example, Request, Response, Session, and Server) used to service HTTP requests.
return void

ValidateFileType() public method

Validates the type of the file.
Filetype not allowed
public ValidateFileType ( HttpContext context, System.Web.HttpPostedFile uploadedFile ) : void
context System.Web.HttpContext The context.
uploadedFile System.Web.HttpPostedFile The uploaded file.
return void