> ## Documentation Index
> Fetch the complete documentation index at: https://intunedhq.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# FileType

A union type representing supported file types for upload operations in web automation.

This type alias standardizes the file types that can be uploaded to S3 storage,
providing flexibility for different upload scenarios from browser downloads to raw binary data.

Type variants:

* `Download`: Playwright Download object from browser download operations
* `bytes`: Raw binary file content

```python theme={null}
type FileType = Download | bytes
```

## Examples

```python Using Download Object theme={null}
from typing import TypedDict
from playwright.async_api import Page
from intuned_browser import download_file, upload_file_to_s3
class Params(TypedDict):
    pass
async def automation(page: Page, params: Params, **_kwargs):
    # From a browser download
    download = await download_file(
        page,
        trigger="https://intuned-docs-public-images.s3.amazonaws.com/32UP83A_ENG_US.pdf"
    )
    uploaded = await upload_file_to_s3(file=download)
```

```python Using Bytes theme={null}
from typing import TypedDict
from playwright.async_api import Page
from intuned_browser import upload_file_to_s3
class Params(TypedDict):
    pass
async def automation(page: Page, params: Params, **_kwargs):
    # From raw bytes
    file_buffer = b"PDF content here..."
    uploaded = await upload_file_to_s3(
        file=file_buffer,
        file_name_override="generated.pdf"
    )
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.