C# 클래스 UploadExamples.Services.NetworkUploadService

Upload service for storing files locally on the network or server
상속: IUploadService
파일 보기 프로젝트 열기: jasonseney/cloudfiles-encoding-demo

공개 메소드들

메소드 설명
CancelUpload ( string fileName ) : void

Cancel the upload and delete the TEMP file

GetFileList ( ) : IEnumerable

Returns a list of the network files

GetFileStream ( string fileName, string path ) : Stream

Get a filestream for a local file on the server

NetworkUploadService ( string uploadLocation, string tempFolderName ) : System

Create a new instance of the network upload service.

StoreFileAdvanced ( string fileName, string path, Stream stream, string parameters, bool firstChunk, bool lastChunk ) : void

Stores the file advanced.

StoreFileAdvanced ( string fileName, string path, byte data, int dataLength, string parameters, bool firstChunk, bool lastChunk ) : void

Receive a chunk of data and store it on disk

보호된 메소드들

메소드 설명
DeleteUploadedFile ( string fileName ) : void

Delete an uploaded file

FinishedFileUpload ( string fileName, string parameters ) : void

Do your own stuff here when the file is finished uploading

비공개 메소드들

메소드 설명
SaveFile ( Stream stream, FileStream fs ) : void

Saves the file.

StoreFile ( string fileName, string path, string parameters, bool firstChunk, bool lastChunk, Action storeAction ) : void

Stores the file using a generic store action for working with a filestream

메소드 상세

CancelUpload() 공개 메소드

Cancel the upload and delete the TEMP file
public CancelUpload ( string fileName ) : void
fileName string Name of the file.
리턴 void

DeleteUploadedFile() 보호된 메소드

Delete an uploaded file
protected DeleteUploadedFile ( string fileName ) : void
fileName string Name of the file.
리턴 void

FinishedFileUpload() 보호된 메소드

Do your own stuff here when the file is finished uploading
protected FinishedFileUpload ( string fileName, string parameters ) : void
fileName string Name of the file.
parameters string The parameters.
리턴 void

GetFileList() 공개 메소드

Returns a list of the network files
public GetFileList ( ) : IEnumerable
리턴 IEnumerable

GetFileStream() 공개 메소드

Get a filestream for a local file on the server
public GetFileStream ( string fileName, string path ) : Stream
fileName string The name of the file to stream back
path string The path
리턴 Stream

NetworkUploadService() 공개 메소드

Create a new instance of the network upload service.
public NetworkUploadService ( string uploadLocation, string tempFolderName ) : System
uploadLocation string The location to store files locally
tempFolderName string A temporary folder name to use for upload transfer
리턴 System

StoreFileAdvanced() 공개 메소드

Stores the file advanced.
public StoreFileAdvanced ( string fileName, string path, Stream stream, string parameters, bool firstChunk, bool lastChunk ) : void
fileName string Name of the file.
path string path to save to
stream Stream The stream.
parameters string The parameters.
firstChunk bool if set to true [first chunk].
lastChunk bool if set to true [last chunk].
리턴 void

StoreFileAdvanced() 공개 메소드

Receive a chunk of data and store it on disk
public StoreFileAdvanced ( string fileName, string path, byte data, int dataLength, string parameters, bool firstChunk, bool lastChunk ) : void
fileName string Name of the file.
path string the path to store the file
data byte The file's data.
dataLength int Length of the data.
parameters string The parameters.
firstChunk bool if set to true [first chunk].
lastChunk bool if set to true [last chunk].
리턴 void