Skip to content

downloadContentVersion

downloadContentVersion(targetOrgConnection, contentVersionDownload, downloadDirectory): Promise<string>

Defined in: contentVersionUtils.ts:97

Download a ContentVersion’s file data to a local directory.

Connection

The org connection to download from.

ContentVersionDownload

The ContentVersion to download; its Id, Title, ContentDocumentId, and FileExtension are used to build the output file path.

string

The local directory to write the file into.

Promise<string>

The local path the file was written to.

If the org returns a non-2xx response, before any file is created.