@backblaze-labs/b2-sdk - v0.1.0
    Preparing search index...

    Class UploadAction

    Uploads a local file to B2.

    Implements

    Index

    Constructors

    Properties

    Methods

    Constructors

    • Creates a new UploadAction for the given relative path.

      Parameters

      • relativePath: string

        Path relative to the sync root.

      • absolutePath: string

        Absolute local filesystem path.

      • size: number

        File size in bytes.

      • doUpload: (absolutePath: string, relativePath: string) => Promise<void>

        Callback that performs the actual upload.

      Returns UploadAction

    Properties

    absolutePath: string

    Absolute local filesystem path.

    relativePath: string

    Path relative to the sync root.

    size: number

    File size in bytes.

    type: "upload" = ...

    The kind of action.

    Methods

    • Uploads the file (unless dryRun) and returns an 'upload-done' event.

      Parameters

      • dryRun: boolean

        Whether to simulate the action without making changes.

      Returns Promise<SyncEvent>

      An async generator yielding sync progress events.