UNPKG

@eyevinn/iaf-plugin-aws

Version:

Eyevinn Ingest Application Framework (IAF) plugin for upload and transcode in AWS

35 lines (34 loc) 1.39 kB
/// <reference types="node" /> import { Uploader } from "./types/interfaces"; import { Readable } from "stream"; import { Logger } from "eyevinn-iaf"; /** * S3 Uploader class * Holds the S3 client that data will be piped through for upload to ingest bucket */ export declare class S3Uploader implements Uploader { destination: string; outputDestination: string; outputFiles: any; region: string; timeout: number; logger: Logger; constructor(destination: string, outputDestination: string, awsRegion: string, outputFiles: {}, logger: Logger, watcherTimeout?: number); /** * Uploads a file to the destination bucket * @param fileStream a Readable stream of the file to upload * @param fileName the name of the uploaded file (this will be the S3 key) * @returns status report from the AWS upload */ upload(fileStream: Readable, fileName: string): Promise<import("@aws-sdk/client-s3").ServiceOutputTypes>; /** * Watches for an object to be uploaded to S3 * @param fileName the name of the file to wait for * @returns An object with the S3 paths to the files if they have been uploaded successfully. * Else an object with the error message if the file has not been uploaded within the timeout period. */ watcher(fileName: string): Promise<{} | { outputs: {}; error: {}; }>; }