Class UploadProgressService
Static in-memory progress tracking using ConcurrentDictionary<TKey, TValue>. This service is used by chunked uploads and progress polling endpoints.
Inherited Members
Namespace: AjaxUploader.Services
Assembly: AjaxUploader.dll
Syntax
public static class UploadProgressService
Methods
Get(string)
Gets progress information for an upload session. Returns null when no progress has been recorded for the supplied ID.
Declaration
public static UploadProgressInfo Get(string uploadId)
Parameters
| Type | Name | Description |
|---|---|---|
| string | uploadId |
Returns
| Type | Description |
|---|---|
| UploadProgressInfo |
Remove(string)
Removes progress information for an upload session. This is typically called after a session is complete or no longer needed.
Declaration
public static void Remove(string uploadId)
Parameters
| Type | Name | Description |
|---|---|---|
| string | uploadId |
Update(string, Action<UploadProgressInfo>)
Updates progress information for an upload session, creating the session if needed. Callers provide a delegate that mutates the current UploadProgressInfo snapshot.
Declaration
public static void Update(string uploadId, Action<UploadProgressInfo> updater)
Parameters
| Type | Name | Description |
|---|---|---|
| string | uploadId | |
| Action<UploadProgressInfo> | updater |