Selva Compute API Reference - v1.1.2
    Preparing search index...

    Function extractFilesFromComputeResponse

    • Extracts and processes files from compute response data without downloading them. Returns an array of ProcessedFile objects that can be used programmatically.

      Parameters

      • downloadableFiles: FileData[]

        An array of FileData items from the compute response.

      • additionalFiles: FileBaseInfo | FileBaseInfo[] | null = null

        Optional additional files to include (fetched from URLs).

      Returns Promise<ProcessedFile[]>

      A Promise resolving to an array of ProcessedFile objects.

      Will throw an error if file processing fails.

      const files = await extractFilesFromComputeResponse(fileData);
      files.forEach(file => {
      console.log(`File: ${file.fileName}, Size: ${file.content.length}`);
      });