Interface IUploaderProvider
Defines the storage operations used by AjaxUploader to save, read, and maintain uploaded files.
Providers abstract where file contents and metadata live.
Assembly: AjaxUploader.dll
Syntax
public interface IUploaderProvider
Methods
Append(Guid, string, Stream)
Appends data to an existing uploaded file.
This is primarily used by compatibility flows and custom upload pipelines.
Declaration
void Append(Guid guid, string fileName, Stream stream)
Parameters
AssembleChunks(string, string, int)
Assembles saved chunks into a final stored upload.
Returns the GUID of the resulting stored file.
Declaration
Guid AssembleChunks(string uploadId, string fileName, int totalChunks)
Parameters
Returns
CopyTo(Guid, string)
Copies a stored upload to a new destination path.
Declaration
void CopyTo(Guid guid, string destinationPath)
Parameters
| Type |
Name |
Description |
| Guid |
guid |
|
| string |
destinationPath |
|
Delete(Guid)
Deletes a stored upload and any metadata associated with it.
Declaration
Parameters
| Type |
Name |
Description |
| Guid |
guid |
|
GetCompletedChunks(string)
Gets the number of completed chunks for a chunked upload session.
Declaration
int GetCompletedChunks(string uploadId)
Parameters
| Type |
Name |
Description |
| string |
uploadId |
|
Returns
GetFilePath(Guid)
Gets the provider-specific file path for a stored upload when available.
Providers that do not expose file-system paths may return null.
Declaration
string GetFilePath(Guid guid)
Parameters
| Type |
Name |
Description |
| Guid |
guid |
|
Returns
GetInfo(Guid)
Gets metadata for a stored upload.
Declaration
UploadedFileInfo GetInfo(Guid guid)
Parameters
| Type |
Name |
Description |
| Guid |
guid |
|
Returns
GetUploadedLength(string)
Gets the number of uploaded bytes currently stored for a chunked upload session.
Declaration
long GetUploadedLength(string uploadId)
Parameters
| Type |
Name |
Description |
| string |
uploadId |
|
Returns
Maintain()
Performs provider-specific maintenance such as expired file cleanup.
Declaration
MoveTo(Guid, string)
Moves a stored upload to a new destination path.
Declaration
void MoveTo(Guid guid, string destinationPath)
Parameters
| Type |
Name |
Description |
| Guid |
guid |
|
| string |
destinationPath |
|
OpenRead(Guid)
Opens a stored upload for reading.
Declaration
Stream OpenRead(Guid guid)
Parameters
| Type |
Name |
Description |
| Guid |
guid |
|
Returns
Persist(Guid)
Marks a stored upload as persisted so cleanup does not remove it automatically.
Declaration
Parameters
| Type |
Name |
Description |
| Guid |
guid |
|
Save(Guid, string, Stream)
Saves a complete uploaded file.
Implementations should also persist metadata needed to reopen the upload later.
Declaration
void Save(Guid guid, string fileName, Stream stream)
Parameters
SaveChunk(string, int, Stream)
Saves one chunk of a chunked upload.
Chunks are stored under the supplied upload session identifier until assembly is requested.
Declaration
void SaveChunk(string uploadId, int chunkIndex, Stream stream)
Parameters