> For the complete documentation index, see [llms.txt](https://docs.diaflow.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.diaflow.io/studio/cross-features-control/upload-file.md).

# Upload File

**What it does:** Attach documents, images, or other files to enhance AI understanding. Files can be uploaded from your device, Diaflow Drive, or captured via camera/webcam.

<figure><img src="https://3864624312-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRdo1pkMnofwxf3lpWftw%2Fuploads%2Fw5xCQXbiZmBF5UeC4F0w%2Funknown.png?alt=media&amp;token=9d659162-3b0a-47f1-8e9a-67f9aed1a409" alt=""><figcaption></figcaption></figure>

<br>

<figure><img src="https://3864624312-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRdo1pkMnofwxf3lpWftw%2Fuploads%2FmNoWfNsus877WlO5BYRE%2Fimage.png?alt=media&amp;token=d9015fc1-edc1-4ef8-8f59-a0d9cdb2b843" alt=""><figcaption></figcaption></figure>

**Supported Formats:**

\- Documents: PDF, DOCX, TXT

\- Images: JPG, JPEG, PNG, WEBP

\- File size limits: Vary by model (typically 50 MB max for documents, check model-specific limits)

<br>

## How to Upload:

### Method 1: From Device

<figure><img src="https://3864624312-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRdo1pkMnofwxf3lpWftw%2Fuploads%2FY8s0fMFIHRBv29TIWjUd%2Fimage.png?alt=media&amp;token=de778641-b384-43fa-986d-9d186c66815b" alt=""><figcaption></figcaption></figure>

1\. Click the \`+\` icon (Upload File button)

2\. Select "**Upload from device**"

3\. Choose file(s) from your computer

4\. File appears in chatbox as a tag/chip

5\. Click \`X\` on file tag to remove before sending

6\. Type your prompt and click Send

<br>

### Method 2: From Diaflow Drive

<figure><img src="https://3864624312-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRdo1pkMnofwxf3lpWftw%2Fuploads%2F4AicUYVhKDhxVfn48Pjg%2Fimage.png?alt=media&amp;token=0c412a50-7b5d-4090-9305-5bcd4f7ccb92" alt=""><figcaption></figcaption></figure>

1\. Click the \`+\` icon

2\. Select "**Use from drive**"

3\. Browse and select file(s) from Drive

4\. Note: Can select multiple files, but only from the same folder

5\. Click "Confirm" to attach

6\. Type your prompt and click Send

<br>

### Method 3: Use Camera/Webcam

<figure><img src="https://3864624312-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRdo1pkMnofwxf3lpWftw%2Fuploads%2F81yl2mijocr3BNn4nUjA%2Fimage.png?alt=media&amp;token=80e169e4-8204-41dd-8cdc-8f297f4a0969" alt=""><figcaption></figcaption></figure>

1\. Click the \`+\` icon

2\. Select "**Use Camera or Webcam**"

3\. Browser requests camera access → Select "Allow"

4\. Take a photo directly

5\. Confirm to attach photo to chatbox

6\. Click Send for AI to analyze or create variations

<br>

**Best Practices**

\- For Image Generation: Upload reference images to guide style and composition

\- For Image Understanding: Upload images to analyze, extract text, or get descriptions

\- For Video Generation: Upload images to animate or use as first/last frames

\- For Knowledge Base: Upload documents to analyze alongside your Vector DB content

\- File Organization: Use Diaflow Drive for frequently accessed files

\- Multiple Files: Can upload multiple files in one conversation (same folder for Drive)

<br>

<mark style="color:$danger;">**Troubleshooting**</mark>

\- Upload failed: Check file type is supported, verify file size is within limits, ensure permissions are granted

\- File too large: Compress file or switch to a model with higher file size limits

\- Format not supported: Check model-specific supported formats

\- Camera not working: Enable camera permission in browser settings and reload

<br>
