import { saveFileToS3 } from "@intuned/browser";
import { BrowserContext, Page } from "playwright";
interface Params {}
export default async function handler(
params: Params,
page: Page,
context: BrowserContext
) {
const uploadedFile = await saveFileToS3({
page,
trigger: "https://sandbox.intuned.dev/pdfs/report.pdf",
configs: {
bucket: "document-storage",
region: "us-east-1",
accessKeyId: "accessKeyId",
secretAccessKey: "SecretAccessKeyId",
},
fileNameOverride: "reports/monthly-report.pdf",
});
console.log(`File uploaded to: ${uploadedFile.getS3Key()}`);
}