C# Class Framework.Mvc.Helpers.UploadHelper

Provides helper methods to save uploaded files.
显示文件 Open project: coreframework/Core-Framework

Public Properties

Property Type Description
AuthenticationCookieKey String
DefaultValueKey String
FileDirectoryPath String
FileTypesDescriptionKey String
FileTypesKey String
GenerateThumbnailFlag String
ResizeImageFlag String
ResizeImageHeight String
ResizeImageWidth String
ThumbnailHeight String
ThumbnailWidth String
UploadOptionsKey String

Public Methods

Method Description
GenerateFileName ( String extension ) : String

Generates unique file name.

GenerateThumbnailFileName ( String extension ) : String

Generates unique thumbnail file name.

SaveFile ( System.Web.HttpPostedFileBase file, String fileName, String>.Func mapPath ) : String

Saves posted file to temporary directory.

Method Details

GenerateFileName() public static method

Generates unique file name.
public static GenerateFileName ( String extension ) : String
extension String The target file extension.
return String

GenerateThumbnailFileName() public static method

Generates unique thumbnail file name.
public static GenerateThumbnailFileName ( String extension ) : String
extension String The target file extension.
return String

SaveFile() public static method

Saves posted file to temporary directory.
public static SaveFile ( System.Web.HttpPostedFileBase file, String fileName, String>.Func mapPath ) : String
file System.Web.HttpPostedFileBase The posted file.
fileName String The posted file name.
mapPath String>.Func The map path delegate. Should map virtual path to server path.
return String

Property Details

AuthenticationCookieKey public_oe static_oe property

Key for authentication cookie.
public static String AuthenticationCookieKey
return String

DefaultValueKey public_oe static_oe property

Key for default value metadata.
public static String DefaultValueKey
return String

FileDirectoryPath public_oe static_oe property

Path to file upload directorty.
public static String FileDirectoryPath
return String

FileTypesDescriptionKey public_oe static_oe property

Key for file types description metadata.
public static String FileTypesDescriptionKey
return String

FileTypesKey public_oe static_oe property

Key for file types metadata.
public static String FileTypesKey
return String

GenerateThumbnailFlag public_oe static_oe property

Key for file uploader option.
public static String GenerateThumbnailFlag
return String

ResizeImageFlag public_oe static_oe property

Key for file uploader option.
public static String ResizeImageFlag
return String

ResizeImageHeight public_oe static_oe property

Key for file uploader option.
public static String ResizeImageHeight
return String

ResizeImageWidth public_oe static_oe property

Key for file uploader option.
public static String ResizeImageWidth
return String

ThumbnailHeight public_oe static_oe property

Key for file uploader option.
public static String ThumbnailHeight
return String

ThumbnailWidth public_oe static_oe property

Key for file uploader option.
public static String ThumbnailWidth
return String

UploadOptionsKey public_oe static_oe property

Key for upload options metadata.
public static String UploadOptionsKey
return String