> 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/agent-builder/agent-builder/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="/files/2jejYhoWC12ZVhTAjamE" alt=""><figcaption></figcaption></figure>

<br>

<figure><img src="/files/9tZwUDjWl49NYo16Tc33" 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="/files/XsrYcMBOFEnU5VNs3sSZ" 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="/files/peFPrgABuTIGzioymmJt" 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="/files/uYs9MEqzoDlLlXFAC8Ed" 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>
