Skip to main content
Downloads a file from a web page and automatically uploads it to AWS S3 storage in a single operation. Combines download_file (for trigger methods) and upload_file_to_s3 (for S3 configuration), providing a streamlined workflow for capturing and storing files.

Examples

Arguments

page
Page
required
The Playwright Page object to use for downloading
trigger
Trigger
required
The Trigger method to initiate the download.
timeout_s
int
Maximum time in seconds to wait for download to start. Defaults to 5.
configs
S3Configs
Optional S3Configs to customize the S3 upload. If not provided, uses environment variables (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_REGION, AWS_ENDPOINT_URL, AWS_BUCKET). If environment variables aren’t set, uses default Intuned S3 settings.
file_name_override
str
Optional custom filename for the uploaded file. If not provided, uses the original filename or generates a unique name.
content_type
str
Optional MIME type for the uploaded file (e.g., “application/pdf”, “image/png”). If None, uses the original content type.

Returns: Attachment

An Attachment object with file metadata and S3 utilities