Skip to main content
export interface S3Configs {
  bucket?: string;
  region?: string;
  accessKeyId?: string;
  secretAccessKey?: string;
  endpoint?: string;
}
Configuration options for AWS S3 storage operations. This interface defines the authentication and configuration properties for connecting to and performing operations with AWS S3 storage. All properties are optional and will fall back to environment variables or default configuration.

Examples

import { uploadFileToS3 } from "@intuned/browser";
export default async function handler(params, page, context){
// Basic S3 configuration
const s3Config: S3Configs = {
  bucket: "my-app-uploads",
  region: "us-east-1",
  accessKeyId: "accessKeyId",
  secretAccessKey: "SecretAccessKeyId"
};

// Use with file upload
const attachment = await uploadFileToS3({
  file: myFile,
  configs: s3Config
});

// Use with download and upload operations
const uploadedFile = await saveFileToS3({
  page,
  trigger: downloadUrl,
  configs: s3Config
});
}