UploadItemRename Method

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.

Definition

Namespace: GleamTech.FileUltimate.AspNet.UI
Assembly: GleamTech.FileUltimate (in GleamTech.FileUltimate.dll) Version: 9.1.3
C#
public void Rename(
	string newFileName,
	bool keepRelativePath = true,
	bool updateOnClient = true
)

Parameters

newFileName  String
The new file name to use 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").
keepRelativePath  Boolean  (Optional)
Whether to keep relative path information from the old name (e.g. rename "SomeFolder\SomeFile.ext" to "SomeFolder\NewFile.ext"). Default is true.
updateOnClient  Boolean  (Optional)
Whether to update the name on client, i.e. show the new name to the user. Default is true.

See Also