Matterway
    Preparing search index...

    Function fileFromInput

    • Returns the files attached to a file input.

      Parameters

      • ctx: Context

        Context object.

      • selector: string

        Selector or XPath for File Input element.

      • Optionaloptions: WaitForSelectorOptions

      Returns Promise<SdkFile[]>

      The file as an Array of blobs for files contained in element.

      const attachments = await fileFromInput(ctx, '.attachment');
      const pdfs = attachments.filter(f => f.type === 'application/pdf');
      const invoices = pdfs.filter(f => f.name.startsWith('invoice-'));
      // ...