C# 클래스 Serenity.Web.UploadHelper

파일 보기 프로젝트 열기: volkanceylan/Serenity 1 사용 예제들

공개 메소드들

메소드 설명
CheckFileNameSecurity ( string fileName ) : void
CopyFileAndRelated ( string sourceFilePath, string targetFilePath, bool overwrite = false ) : void
CopyFileAndRelatedToHistory ( string sourceFilePath ) : string
CopyTemporaryFile ( string dbTemporaryFile, object entityId, FilesToDelete filesToDelete, string>.Func fileNameReplacer = null ) : CopyTemporaryFileResult
CopyTemporaryFile ( string dbTemporaryFile, object entityId, string>.Func fileNameReplacer = null ) : CopyTemporaryFileResult
DbFilePath ( string dbFileName ) : string
DeleteFileAndRelated ( string dbFileName, DeleteType deleteType ) : void
FileNameSizeDisplay ( string name, int bytes ) : string
FileSizeDisplay ( int bytes ) : string
FormatDbFileName ( object entityId, string extension ) : string
FormatDbFileName ( string format, object identity, string extension ) : string
GetMimeType ( string fileName ) : string

Gets MIME type for a given file using information in Win32 HKEY_CLASSES_ROOT registry key.

GetThumbFileName ( string fileName, string thumbSuffix = "_t.jpg" ) : string
ImageFileUrl ( string fileName, bool thumbnailUrl ) : string

Gets URL of an image file or its thumbnail under a subfolder of file upload root. If filename starts with "approval?", approval folder is used instead of the specified subfolder name. If file name is empty, then a null image file URL is returned

RegisterFilesToDelete ( IUnitOfWork unitOfWork, FilesToDelete filesToDelete ) : void
ToPath ( string fileName ) : string

Converts forward slashes to backslashes

ToUrl ( string fileName ) : string

Converts backslashes to forward slashes

UploadHelper ( string dbFileFormat ) : Serenity.ComponentModel

메소드 상세

CheckFileNameSecurity() 공개 정적인 메소드

public static CheckFileNameSecurity ( string fileName ) : void
fileName string
리턴 void

CopyFileAndRelated() 공개 정적인 메소드

public static CopyFileAndRelated ( string sourceFilePath, string targetFilePath, bool overwrite = false ) : void
sourceFilePath string
targetFilePath string
overwrite bool
리턴 void

CopyFileAndRelatedToHistory() 공개 정적인 메소드

public static CopyFileAndRelatedToHistory ( string sourceFilePath ) : string
sourceFilePath string
리턴 string

CopyTemporaryFile() 공개 메소드

public CopyTemporaryFile ( string dbTemporaryFile, object entityId, FilesToDelete filesToDelete, string>.Func fileNameReplacer = null ) : CopyTemporaryFileResult
dbTemporaryFile string
entityId object
filesToDelete FilesToDelete
fileNameReplacer string>.Func
리턴 CopyTemporaryFileResult

CopyTemporaryFile() 공개 메소드

public CopyTemporaryFile ( string dbTemporaryFile, object entityId, string>.Func fileNameReplacer = null ) : CopyTemporaryFileResult
dbTemporaryFile string
entityId object
fileNameReplacer string>.Func
리턴 CopyTemporaryFileResult

DbFilePath() 공개 정적인 메소드

public static DbFilePath ( string dbFileName ) : string
dbFileName string
리턴 string

DeleteFileAndRelated() 공개 정적인 메소드

public static DeleteFileAndRelated ( string dbFileName, DeleteType deleteType ) : void
dbFileName string
deleteType DeleteType
리턴 void

FileNameSizeDisplay() 공개 정적인 메소드

public static FileNameSizeDisplay ( string name, int bytes ) : string
name string
bytes int
리턴 string

FileSizeDisplay() 공개 정적인 메소드

public static FileSizeDisplay ( int bytes ) : string
bytes int
리턴 string

FormatDbFileName() 공개 메소드

public FormatDbFileName ( object entityId, string extension ) : string
entityId object
extension string
리턴 string

FormatDbFileName() 공개 정적인 메소드

public static FormatDbFileName ( string format, object identity, string extension ) : string
format string
identity object
extension string
리턴 string

GetMimeType() 공개 정적인 메소드

Gets MIME type for a given file using information in Win32 HKEY_CLASSES_ROOT registry key.
public static GetMimeType ( string fileName ) : string
fileName string /// File name whose MIME type will be determined. Its only extension part will be used.
리턴 string

GetThumbFileName() 공개 정적인 메소드

public static GetThumbFileName ( string fileName, string thumbSuffix = "_t.jpg" ) : string
fileName string
thumbSuffix string
리턴 string

ImageFileUrl() 공개 정적인 메소드

Gets URL of an image file or its thumbnail under a subfolder of file upload root. If filename starts with "approval?", approval folder is used instead of the specified subfolder name. If file name is empty, then a null image file URL is returned
public static ImageFileUrl ( string fileName, bool thumbnailUrl ) : string
fileName string /// File name.
thumbnailUrl bool /// True to return thumbnail URL.
리턴 string

RegisterFilesToDelete() 공개 정적인 메소드

public static RegisterFilesToDelete ( IUnitOfWork unitOfWork, FilesToDelete filesToDelete ) : void
unitOfWork IUnitOfWork
filesToDelete FilesToDelete
리턴 void

ToPath() 공개 정적인 메소드

Converts forward slashes to backslashes
public static ToPath ( string fileName ) : string
fileName string /// Filename.
리턴 string

ToUrl() 공개 정적인 메소드

Converts backslashes to forward slashes
public static ToUrl ( string fileName ) : string
fileName string /// Filename.
리턴 string

UploadHelper() 공개 메소드

public UploadHelper ( string dbFileFormat ) : Serenity.ComponentModel
dbFileFormat string
리턴 Serenity.ComponentModel