Creating Plot Twists
    Preparing search index...

    Class FilesAbstract

    Built-in tool for reading files attached to notes in Plot.

    Files are uploaded by clients via POST /files which creates an ActionType.file entry on a note. Connectors call read() during outbound (e.g. onNoteCreated) to retrieve those bytes and send them to the source system.

    For inbound attachments, connectors emit ActionType.fileRef actions and implement Connector.downloadAttachment — no upload tool is needed because inbound bytes never enter Plot's R2 storage.

    Hierarchy (View Summary)

    Index

    Constructors

    Methods

    Constructors

    Methods

    • Read a file uploaded by a client and attached to a note in a focus where this twist is installed.

      Parameters

      • fileId: string

        The id from an ActionType.file action.

      Returns Promise<
          {
              data: Uint8Array;
              fileName: string;
              mimeType: string;
              fileSize: number;
          },
      >

      Bytes plus original metadata.

      FileNotFoundError if the file is missing or out of scope.