Skip to main content

AddObjectFile

Description

Perform add file for MFD.

If a data URL is provided it takes precedence and will be used as the added file (overriding fileToBeAdded). Data URLs must be base64-encoded, include a MIME type and the decoded payload must not exceed 64 MiB (67,108,864 bytes). When using a data URL you must also provide dataURLName (filename for the decoded file).

Syntax

// shellListing points to instance of IShellListing
await shellListing.AddObjectFile(
selectedObject,
fileToBeAdded,
dataURL,
dataURLName,
);

Parameters

NameOptionalityTypeDescription
selectedObjectRequiredISelectedFileSelected object info.
fileToBeAddedRequirednull | FileListFile to add (ignored if dataURL provided). See
FileList from MDN
dataURLOptionalnull | stringOptional data URL (base64 + mime); overrides fileToBeAdded.
dataURLNameOptionalnull | stringFilename to use when dataURL is supplied (required with dataURL).

Return type

TypeDescription
Promise < void >Method does not return a value