Skip to content

Configuration

interface PipelineConfig {
storage: {
type: StorageType;
baseDir: string;
credentials?: CloudinaryCredentials | S3Credentials;
};
}
const config = {
storage: {
type: "local",
baseDir: "./output",
},
};
const config = {
storage: {
type: "cloudinary",
baseDir: "./output",
credentials: {
cloudName: "your-cloud-name",
apiKey: "your-api-key",
apiSecret: "your-api-secret",
},
},
};
const config = {
storage: {
type: "s3",
baseDir: "./output",
credentials: {
accessKeyId: "your-access-key-id",
secretAccessKey: "your-secret-access-key",
region: "your-region",
bucket: "your-bucket",
folderName: "mediapipeline",
},
},
};

The type union includes more values, but this release validates and supports:

  • local
  • cloudinary
  • s3

Other storage values in the type union are reserved and currently fail validation.

Provide one or more string keys when creating the SDK instance:

const sdk = new MediaPipelineSDK(config, ["1080", "720", "480"]);

If no resolutions are provided, the SDK falls back to "720".