UploadItem Class

Represents details for an upload item in an upload queue started by a client upload action.

Definition

Namespace: GleamTech.FileUltimate.AspNet.UI
Assembly: GleamTech.FileUltimate (in GleamTech.FileUltimate.dll) Version: 9.2.0
C#
public sealed class UploadItem
Inheritance
Object    UploadItem

Properties

ChunkCount Gets the chunk count for the upload item. Upload method Html5 splits the file into chunks, then uploads chunks one by one to overcome server's request limitations. The value will be 1 even if there is no chunked uploading.
ContentType Gets the file content type (mime type) for the upload item. This property is determined from the value of Name (from file extension).
DateModified Gets the file modified date passed by the client for the upload item. This can be a null for legacy upload methods Html4 and Silverlight, as the file modified date cannot be known.
Exception Gets the exception thrown for the failed upload item. This will be null unless Status is Failed.
Id Gets the unique id passed by the client for the upload item.
Name Gets the file name passed by the client for the upload item. This can be a simple file name (e.g. "SomeFile.ext") or can contain relative path information (e.g. "SomeFolder\SomeFile.ext").
OwnerQueue Gets the owner queue of the upload item.
Size Gets the file size passed by the client for the upload item. This can be a null for legacy upload method Html4, as the file size cannot be known before starting the actual upload. However, the size will be calculated and updated from "multipart/form-data" request headers as soon as the upload starts.
SizeAsString Gets the string representation of Size - the file size passed by the client for the upload item. This will be empty string if the file size is not known yet.
Status Gets the status for the upload item. This will be updated until the upload item is completed.
StatusMessage Gets the status for the upload item. This will be updated until the upload item is completed. Mostly useful when status is Rejected or Failed
UploadedSize Gets the uploaded size for the upload item. This will be incremented until the upload item is completed.
UploadedSizeAsString Gets the string representation of UploadedSize - the uploaded size for the upload item. This will be incremented until the upload item is completed.

Methods

ConfirmReplace Asks the user to confirm replacing of an already existing item before uploading, i.e. shows a confirmation dialog with existing file info to the user. User can choose to replace (overwrite), skip or keep both (use a new file name).

This method is effective only if item uploading is not started yet, i.e. Status is Pending and if Reject(String) method is not already called.

This method can be called inside Uploading event handler and BeginQueue(UploadQueue, IEnumerableUploadItem) method.

Reject Rejects this upload item and shows a reason to the user. This method is effective only if item uploading is not started yet, i.e. Status is Pending,

This method can be called inside Uploading, ItemUploading event handlers and BeginQueue(UploadQueue, IEnumerableUploadItem), BeginItem(UploadItem) methods.

Rename Renames the upload item without asking the user before uploading.

This method is effective only if item uploading is not started yet, i.e. Status is Pending and if Reject(String) method is not already called. If ConfirmReplace(String, DateTime, Int64, String) method was called before, this method will reset it.

This method can be called inside Uploading event handler and BeginQueue(UploadQueue, IEnumerableUploadItem) method.

See Also