Interface IUploadService
Defines the high-level upload operations used by the Web Forms controls and handler.
Implementations coordinate validation, storage, chunk assembly, and file retrieval.
Assembly: AjaxUploader.dll
Syntax
public interface IUploadService
Methods
CompleteChunkedUpload(string, string, int)
Completes a chunked upload by assembling the stored chunks into a final stored file.
Declaration
UploadResult CompleteChunkedUpload(string uploadId, string fileName, int totalChunks)
Parameters
Returns
CopyFile(Guid, string)
Copies a stored uploaded file to a new destination path.
Declaration
void CopyFile(Guid fileGuid, string destinationPath)
Parameters
| Type |
Name |
Description |
| Guid |
fileGuid |
|
| string |
destinationPath |
|
DeleteFile(Guid)
Deletes a stored uploaded file.
Declaration
void DeleteFile(Guid fileGuid)
Parameters
| Type |
Name |
Description |
| Guid |
fileGuid |
|
GetFileInfo(Guid)
Gets metadata for a stored uploaded file.
Declaration
UploadedFileInfo GetFileInfo(Guid fileGuid)
Parameters
| Type |
Name |
Description |
| Guid |
fileGuid |
|
Returns
MoveFile(Guid, string)
Moves a stored uploaded file to a new destination path.
Declaration
void MoveFile(Guid fileGuid, string destinationPath)
Parameters
| Type |
Name |
Description |
| Guid |
fileGuid |
|
| string |
destinationPath |
|
OpenFile(Guid)
Opens a stored uploaded file for reading.
Declaration
Stream OpenFile(Guid fileGuid)
Parameters
| Type |
Name |
Description |
| Guid |
fileGuid |
|
Returns
UploadChunk(string, int, int, string, long, Stream)
Saves one chunk of a chunked upload request.
The upload session is identified by uploadId and tracked until completion.
Declaration
UploadResult UploadChunk(string uploadId, int chunkIndex, int totalChunks, string fileName, long totalFileSize, Stream chunkStream)
Parameters
Returns
UploadFile(Stream, string, long, string)
Uploads a complete file in a single request.
Returns an UploadResult that includes success state, file GUID, and error details.
Declaration
UploadResult UploadFile(Stream fileStream, string fileName, long fileSize, string contentType = null)
Parameters
Returns
ValidateFile(string, long)
Validates the file name and file size against current configuration rules.
Returns null when the file is valid; otherwise returns an error message.
Declaration
string ValidateFile(string fileName, long fileSize)
Parameters
| Type |
Name |
Description |
| string |
fileName |
|
| long |
fileSize |
|
Returns