Function loadS3File

  • Load the content of a file stored in S3. If the s3ResourcePath is undefined, it will default to the workspace S3 resource.

    let fileContent = await wmill.loadS3FileContent(inputFile)
    // if the file is a raw text file, it can be decoded and printed directly:
    const text = new TextDecoder().decode(fileContentStream)
    console.log(text);

    Parameters

    • s3object: S3Object
    • s3ResourcePath: undefined | string = undefined

    Returns Promise<Uint8Array | undefined>