Skip to content
View as Markdown
View as Markdown

@salesforce/b2c-tooling-sdk / operations/code / uploadFiles

Function: uploadFiles()

uploadFiles(instance, codeVersion, uploads, deletes, options?): Promise<void>

Defined in: packages/b2c-tooling-sdk/src/operations/code/upload-files.ts:76

Uploads and deletes files on an instance via WebDAV.

This is the core batch-upload pipeline used by both watchCartridges and the VS Code extension. It:

  1. Filters out non-existent upload files
  2. Creates a ZIP archive of upload files
  3. Uploads via WebDAV PUT and unzips on server
  4. Deletes files (skipping any that were also uploaded in the same batch)

Parameters

instance

B2CInstance

B2C instance to sync to

codeVersion

string

Code version to deploy to

uploads

FileChange[]

Files to upload

deletes

FileChange[]

Files to delete

options?

UploadFilesOptions

Callbacks for upload/delete/error events

Returns

Promise<void>

Released under the Apache-2.0 License.