Skip to main content

ReplaceFile

Description

Perform file replace.

Syntax

// shellListing points to instance of IShellListing
await shellListing.ReplaceFile(
selectedFileID,
selectedObject,
fileToBeReplaced,
dataURL,
dataURLName,
);

Parameters

NameOptionalityTypeDescription
selectedFileIDRequirednumberSelected file's ID.
selectedObjectRequiredISelectedFileSelected object info.
fileToBeReplacedRequirednull | FileListInfo of file to be replaced. See
https://developer.mozilla.org/en-US/docs/Web/API/FileList
dataURLOptionalnull | stringData URL of the file to be replaced.
Only base64-encoded data URLs are supported and MIME-type is not optional.
Syntax should be: "data:[<media-type>][;base64],<data>".
dataURLNameOptionalnull | stringName of the file with the extension represented by the data URL.

Return type

TypeDescription
Promise < void >Method does not return a value