Table of Contents

UploadItem.Rename Method

Definition

Namespace
GleamTech.FileUltimate.AspNet.UI
Assembly
GleamTech.FileUltimate.dll

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, long, string) method was called before, this method will reset it.

This method can be called inside Uploading event handler and BeginQueue(UploadQueue, IEnumerable<UploadItem>) method.

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 bool

Whether to keep relative path information from the old name (e.g. rename "SomeFolder\SomeFile.ext" to "SomeFolder\NewFile.ext"). Default is true.

updateOnClient bool

Whether to update the name on client, i.e. show the new name to the user. Default is true.