File & Image Uploads
Let visitors send photos, screenshots, and PDF documents directly in the chat โ the AI sees, reads, and responds.
What It Does
When enabled, a ๐ attachment button appears in the chat widget. Visitors can attach a file alongside their message, and the AI processes it in real time:
- Images (JPG, PNG, WebP) โ sent to the AI model's vision capability. The model literally sees the image and can describe it, answer questions about it, or extract information from it.
- PDF documents โ text is extracted automatically and injected into the conversation context, so the AI can read, summarize, or answer questions about the document.
Each message can include one attachment. Files are processed once and not stored permanently โ they exist only for the duration of the conversation turn.
What Can the AI See?
AI vision models are remarkably capable. Here's what they can identify and understand:
| Category | What the AI Can Do |
|---|---|
| Text in images | Read printed or handwritten text, labels, signs, menus, receipts, invoices, error messages on screens |
| Objects & products | Identify products, equipment, parts, brands, models, colors, materials |
| Scenes & context | Understand rooms, buildings, landscapes, damage, wear, layout, decoration |
| Charts & diagrams | Interpret graphs, flowcharts, org charts, floor plans, technical diagrams |
| Documents | Read forms, contracts, certificates, IDs (though it should NOT store personal data), business cards |
| Screenshots | Understand UI elements, error dialogs, dashboards, spreadsheet data, app screens |
| Medical / scientific | Describe lab results, X-rays, charts (with appropriate disclaimers) |
- Very small text or low-resolution images may be hard to read
- The AI may make mistakes โ always verify critical data with a human
- Handwriting recognition depends on legibility
- The AI cannot run code from screenshots โ it can only describe what it sees
Setup (2 Steps)
1. Enable on Your Bot
- Go to AxiaChat AI โ Bots
- Edit your bot and scroll to the "File Upload" section
- Toggle on "Allow file uploads from chat"
2. Configure Options
| Setting | Description | Default |
|---|---|---|
| Max file size | Maximum upload size in MB (1โ20) | 5 MB |
| Allowed types | Which file formats visitors can send | PDF, JPG, PNG, WebP |
Select only the types that make sense for your use case. For example, a legal bot might only need PDF; a home renovation bot might only need images.
How It Works Internally
- Visitor clicks ๐, selects a file, and writes their message
- The file is uploaded via AJAX and validated (type, size, security checks)
- Images are automatically optimized (resized to max 1536px, compressed) to reduce API costs and speed up processing
- PDFs have their text extracted (up to 50,000 characters)
- The processed content is passed to the AI model alongside the user's question
- A thumbnail preview appears in the user's message bubble so both parties see what was sent
- The AI responds based on both the message text and the file content
AI Provider Compatibility
All three supported providers handle file uploads, but each has different strengths for vision analysis:
| Provider | Best Models | Strengths | Notes |
|---|---|---|---|
| OpenAI | GPT-4o, GPT-5.x | Excellent at OCR (text in images), detailed descriptions, charts | Most popular choice for vision tasks |
| Anthropic | Claude Sonnet 4.5, Opus 4.x | Strong reasoning about image content, nuanced analysis | Great for complex documents and multi-step reasoning |
| Google Gemini | Gemini 2.5 Pro, 2.5 Flash | Fast processing, good general vision, free tier available | Best option if you want vision analysis at zero API cost |
For image analysis, use a vision-capable model. Older text-only models (GPT-3.5, etc.) will ignore the image.
Google Gemini's free API tier includes vision capability. Your visitors can send photos and get AI analysis at zero cost โ great for testing and low-traffic sites.
Real-World Use Cases
File uploads transform your chatbot from a text-only assistant into a visual + document-aware agent. Here are practical examples:
๐ Home Services & Renovation
| Visitor Sends | AI Responds |
|---|---|
| Photo of a water-stained ceiling | "I can see water damage on your ceiling โ there's a brownish stain spreading from what appears to be near a pipe junction. This typically indicates a slow leak. Would you like me to collect your details for a callback?" |
| Photo of a kitchen | "I see a kitchen with wooden cabinets, granite countertops, and tile backsplash. The space is approximately 3ร4 meters. For a full renovation, budgets typically start at โฌ8,000โโฌ12,000. Want me to schedule a free on-site assessment?" |
| Photo of a cracked tile floor | "I can see several cracked ceramic tiles in what looks like a hallway area. Replacing individual tiles is possible if you have matching spares, otherwise a section replacement may be needed. Shall I get you a quote?" |
โ๏ธ Legal & Professional Services
| Visitor Sends | AI Responds |
|---|---|
| Photo of a traffic ticket | "I can see this is a speeding violation ticket for driving at 78 km/h in a 50 km/h zone. The fine appears to be โฌ200. You have 20 calendar days to appeal. Would you like information about our traffic violation defense service?" |
| PDF contract | "I've reviewed your contract. Key points: the term is 12 months, the cancellation clause requires 30 days written notice, and there's a penalty of โฌ500 for early termination. Would you like me to explain any clause in detail?" |
| Photo of water damage in a rental | "I can see significant water damage along the baseboard extending up the wall approximately 30cm. This could constitute grounds for a rent reduction claim. Would you like to schedule a consultation with one of our attorneys?" |
๐ข Corporate Intranet & Internal Use
Deploy AxiaChat on an intranet or internal portal. Employees upload screenshots, reports, or diagrams and get instant AI-powered analysis โ no need to search through file servers or wait for a colleague's response.
| Employee Sends | AI Responds |
|---|---|
| Screenshot of a server error dashboard | "I can see three critical alerts: disk usage at 94% on server-prod-03, memory at 97% on server-prod-01, and 23 failed health checks in the last hour. Based on our runbook, the priority action is to clear the temp files on prod-03 and restart the worker service on prod-01." |
| Photo of a whiteboard from a meeting | "I can read the whiteboard notes. The key action items are: 1) Maria โ finalize Q2 budget by March 15, 2) Carlos โ prepare vendor comparison slides, 3) Team โ OKR review moved to Tuesday 10am. Shall I format this as a summary email?" |
| Screenshot of a spreadsheet | "I can see a sales report for February. Total revenue: โฌ142,500 across 4 regions. The North region leads at โฌ52,300 (+12% vs January), while the South region dropped 8% to โฌ28,100." |
๐ E-commerce & Product Support
| Visitor Sends | AI Responds |
|---|---|
| Photo of a defective item received | "I can see the product has a visible crack on the left side and the finish appears scratched. This qualifies for our return/exchange policy. I'll collect your order number and email to start the process right away." |
| Screenshot of competitor pricing | "I see a competitor offering the XYZ Model at โฌ149. Our current price is โฌ159, but we include free shipping and a 3-year warranty. I can offer you a 10% loyalty discount. Would you like me to apply it?" |
| Photo of a product label/barcode | "I can read the model number: ABC-1234. This is our ProLine Water Filter, compatible with models X, Y, and Z. It's currently in stock. Would you like to add it to your cart?" |
๐ Education & Training
| Visitor Sends | AI Responds |
|---|---|
| Photo of a math equation on paper | "I can see the equation: 3xยฒ + 12x - 15 = 0. Let me solve it step by step: First, divide everything by 3: xยฒ + 4x - 5 = 0. Factoring: (x + 5)(x - 1) = 0. So x = -5 or x = 1." |
| Screenshot of an error in code | "I can see a TypeError on line 42: 'Cannot read property map of undefined'. This means the array you're calling .map() on doesn't exist at that point. Check that the API response is properly parsed before accessing the data array." |
๐ฅ Healthcare & Wellness
| Visitor Sends | AI Responds |
|---|---|
| Photo of a medication package | "I can see this is Ibuprofen 600mg tablets. The typical adult dosage is one tablet every 6-8 hours with food. Please note: I'm an AI assistant and cannot provide medical advice. Always consult your doctor or pharmacist." |
| Photo of a lab results page | "I can read your results. Your glucose level shows 95 mg/dL (normal range: 70-100) and cholesterol is 210 mg/dL (borderline high). These are informational readings only โ please discuss them with your healthcare provider." |
๐ง Technical & Field Services
| Technician Sends | AI Responds |
|---|---|
| Photo of a machine serial number plate | "I can read the plate: Model AX-500, Serial: SN2024-08-1547, manufactured June 2024. The warranty is still active until June 2026. The maintenance schedule for this model requires filter replacement every 500 hours." |
| Photo of a wiring connection | "I can see the wiring panel. The blue wire on terminal 3 appears to be loose โ it's not fully seated in the connector. Also, terminal 7 shows signs of overheating (darkened insulation). I'd recommend replacing that section of wire before reconnecting." |
What Visitors See
The upload experience is designed to feel natural:
- A ๐ clip icon appears to the left of the send button
- After selecting a file, a preview bar shows the file name (and thumbnail for images) above the input
- The visitor types their question and hits send
- The sent message shows a small thumbnail (for images) or a file indicator (for PDFs) attached to their message bubble
- The AI responds, referencing the file content in its answer
Admin Logs
When file uploads are used, the admin conversation logs reflect this:
- The logs list shows a ๐ icon next to conversations that contain file attachments
- The conversation detail page shows a thumbnail preview (clickable to view full size for images) next to the user's message
This makes it easy to review conversations where documents or images were exchanged.
PDF & Document Analysis
When a visitor uploads a PDF, AxiaChat extracts the text content (up to 50,000 characters) and injects it as conversation context. The AI can then:
- Summarize โ "Give me a summary of this contract in 5 bullet points"
- Find specific info โ "What's the payment deadline in this invoice?"
- Compare โ "Does this document mention any penalties for early termination?"
- Explain โ "What does clause 4.2 mean in plain language?"
- Extract data โ "List all the dates and amounts mentioned in this document"
PDF Examples by Industry
| Document Type | What Visitors Ask |
|---|---|
| Rental contract | "Can my landlord raise the rent within the first year?" / "What's the notice period?" |
| Insurance policy | "Am I covered for water damage?" / "What's my deductible?" |
| Product manual | "How do I reset this device?" / "What's the recommended operating temperature?" |
| Financial report | "What was the EBITDA growth?" / "Summarize the key risks mentioned" |
| Academic paper | "What methodology did they use?" / "What are the main conclusions?" |
| Invoice | "What's the total amount due?" / "When is the payment deadline?" |
If a PDF is a scanned image (no selectable text), the text extractor will get little or nothing. In that case, suggest your visitors take a photo of the document instead โ the AI vision can read text from photos.
Writing Effective Bot Instructions
The key to getting great results from vision analysis is writing clear bot instructions in Training โ Instructions. Here are tested templates:
General-purpose vision instructions
When a user sends an image, carefully analyze everything visible:
objects, text, colors, layout, condition, and context. Describe what
you see in detail, then answer the user's question based on your
observations. If you're uncertain about something, say so.
Product support bot
If the user sends a photo of a product:
1. Identify the product model if visible (check labels, model numbers)
2. Assess the condition (new, used, damaged)
3. If damaged, describe the damage and advise on warranty or return
4. If they're asking about compatibility, check against our catalog
Always be empathetic if reporting a defect. Offer to start a return
or connect them with support if needed.
Home services quote bot
When visitors send photos of their home or property:
- Describe what you see (room type, dimensions if estimable, condition)
- Identify any issues (damage, wear, outdated fixtures)
- Provide a rough cost range based on typical project pricing
- ALWAYS mention that an on-site visit is required for an exact quote
- Offer to schedule a free assessment visit
Use warm, helpful language. Don't be alarmist about damage.
Document review bot
When the user uploads a PDF:
- Read the full document carefully
- Identify the document type (contract, invoice, report, etc.)
- Answer the user's specific question based on the document content
- Highlight important dates, amounts, or deadlines if relevant
- If the document contains legal terms, explain them in plain language
- NEVER provide legal, medical, or financial advice โ suggest they
consult a professional for important decisions
Internal corporate assistant
Employees may send screenshots, reports, or internal documents.
When analyzing:
- Extract key data points and present them clearly
- Reference internal procedures from the knowledge base when relevant
- For error screenshots, check the known issues database first
- For spreadsheet data, identify trends and anomalies
- Always format output clearly with bullet points or tables
You are an internal assistant โ be direct, concise, and action-oriented.
Tips for Best Results
For image uploads
- Good lighting matters โ tell visitors to use well-lit photos for best analysis
- Close-up for details โ if the AI needs to read text or see damage, closer is better
- One subject per photo โ focused images get better results than cluttered scenes
- AxiaChat auto-optimizes โ images are resized to 1536px max and compressed, so visitors don't need to worry about file size
For PDF uploads
- Text-based PDFs work best โ documents created digitally (Word, Google Docs) extract perfectly
- Scanned PDFs may not work โ if the PDF is an image scan, suggest taking a photo instead
- Up to 50,000 characters โ very long documents are truncated; for shorter documents, the full text is analyzed
- Multi-page support โ the AI receives all extracted text, so it can answer about any section
For bot builders
- Be specific in instructions โ tell the bot exactly what to look for ("if the user sends a photo of a broken product...")
- Provide context โ the AI works better when it knows your business ("we are a home renovation company specializing in kitchens and bathrooms")
- Set boundaries โ clearly state what the bot should NOT do ("never provide medical diagnoses")
- Combine with tools โ pair vision analysis with lead capture ("after analyzing the photo, collect the visitor's contact details for a follow-up")
Example Conversations
Complete conversation flows showing the feature in action:
Scenario 1: Home renovation quote
๐ค Visitor: [attaches photo of a bathroom] Hi! I want to renovate this bathroom. Can you give me a rough idea?
๐ค Bot: I can see a bathroom approximately 2.5ร3 meters with a bathtub, single sink, and tiled walls. The tiles look outdated but structurally sound. For a full renovation, typical budgets range from โฌ6,000 to โฌ10,000 depending on material choices. Would you like to schedule a free on-site visit for a precise quote?
๐ค Visitor: Yes, that sounds great!
๐ค Bot: Perfect! Let me collect a few details to book your visit...
Scenario 2: Product defect report
๐ค Visitor: [attaches photo of a cracked screen] My tablet arrived like this. What can I do?
๐ค Bot: I'm sorry to see that! I can see a crack running diagonally across the screen, starting from the top-left corner. This is clearly shipping damage. You're fully covered under our delivery guarantee. I'll need your order number to start the replacement process โ do you have it handy?
๐ค Visitor: Yes, it's ORD-2026-45821
๐ค Bot: Found it! I've initiated a replacement for your order ORD-2026-45821. You'll receive a prepaid return label by email within the hour, and we'll ship the replacement as soon as we receive the damaged unit.
Scenario 3: Document analysis
๐ค Visitor: [attaches rental contract PDF] Can my landlord increase the rent in the first year?
๐ค Bot: I've reviewed your rental contract. According to Clause 5.2, the rent is fixed for the first 12 months from the signing date (January 15, 2026). After that period, the landlord may apply an annual increase tied to the CPI index, with 30 days written notice. So no, your rent cannot be increased until January 15, 2027 at the earliest. Would you like me to highlight any other clauses?
Security & Privacy
- ๐ No public URLs โ uploaded images are stored securely as base64 in the database, never as publicly accessible files on disk
- ๐ Admin-only access โ only authenticated administrators can view uploaded images in the conversation logs
- ๐ก๏ธ File validation โ MIME types are verified server-side; only explicitly allowed file types are accepted
- ๐ Size limits โ configurable per bot (1โ20 MB), enforced both client-side and server-side
- ๐งน Minimal retention โ files exist in memory for the AI call; the optimized image is stored in the database for admin review only
- โ GDPR โ the same consent flow applies to file uploads as to text messages
Troubleshooting
Clip icon doesn't appear
- Make sure "Allow file uploads from chat" is enabled in your bot's settings
- Check that at least one file type is selected
Upload fails with an error
- Verify the file is within the size limit (default: 5 MB)
- Check that the file extension matches one of the allowed types
- Server-side: ensure PHP
upload_max_filesizeandpost_max_sizeare large enough in yourphp.ini
AI doesn't reference the image
- Use a vision-capable model (GPT-4o, Claude Sonnet, Gemini Pro)
- Older text-only models (GPT-3.5, etc.) cannot process images โ they will ignore the visual content
- Add explicit instructions telling the bot to analyze attached images
PDF text not extracted
- The PDF might be image-based (scanned document). These contain no extractable text โ the AI receives an empty document
- For scanned PDFs, consider taking a photo/screenshot instead, so the AI vision can read it
Integration with Tools, Webhooks & MCP
One of the most powerful aspects of file uploads is how they combine with AI Tools, Custom Webhooks, and MCP Servers. When a visitor sends an image, AxiaChat processes it securely โ the AI receives the visual content via base64 and can describe what it sees. It can then pass a description, extracted data, or base64-encoded image data as arguments when calling tools.
Uploaded images are never exposed via public URLs. They are stored as base64 in the database, accessible only to authenticated administrators. The AI analyzes the image using vision and can forward relevant data (descriptions, extracted text, or base64 image data) to tools and webhooks.
How It Works
- Visitor uploads an image โ AxiaChat optimizes it and stores it securely as base64 in the database (never as a public file)
- The AI model receives the image via its vision capability and analyzes it
- If a tool/webhook/MCP server is available and relevant, the model calls it โ passing a description, extracted data, or
image_base64as arguments - The external system receives the data and processes it however it needs
With Custom Webhooks
Go to AxiaChat AI โ Tools โ Custom Webhooks and create a webhook that includes an image_base64 or image_description parameter in its schema. Example scenarios:
- Zapier/Make/n8n automation: Visitor sends a photo โ AI analyzes and calls your webhook with a detailed description โ automation platform creates a task
- Damage report system: Insurance customer sends damage photo โ AI calls webhook with
image_description,severity, and optionallyimage_base64โ your backend creates a claim - Product identification: Customer sends product photo โ AI identifies it and calls webhook with
detected_productandproduct_idโ your CRM logs the inquiry
Webhook schema example:
Parameters:
- image_description (string, required): "AI-generated description of the uploaded image"
- image_base64 (string, optional): "Base64-encoded image data for further processing"
- category (enum: damage|inquiry|feedback): "Type of request"
Bot instructions example:
When a user sends a photo of property damage, analyze the image,
describe the damage you see, and call the report_damage webhook
passing your description and the severity level.
With MCP Servers
If you have MCP Servers connected, the same principle applies. Any MCP tool can receive image descriptions or base64 data as arguments. Examples:
- An internal OCR service that processes base64 image data
- A document management system that archives uploaded files
- A computer vision API that classifies or tags images
With n8n, Zapier & Make
These automation platforms work perfectly via Custom Webhooks:
- Create a Webhook trigger in n8n/Zapier/Make
- Copy the webhook URL
- In AxiaChat, go to Tools โ Custom Webhooks and create a new webhook with that URL
- Add
image_descriptionand/orimage_base64as parameters in the schema - In your automation, decode the base64 data to reconstruct the image if needed
- Process it: save to Google Drive, attach to a ticket, send via email, run OCR, etc.
Unlike solutions that save uploaded files to public URLs, AxiaChat stores images securely in the database. No files are left on disk accessible to anyone with the URL. This is critical when visitors upload sensitive documents like contracts, medical records, or financial information.
Practical Integration Examples
| Scenario | Tool Type | What the AI Passes |
|---|---|---|
| Customer sends damage photo for insurance claim | Custom Webhook โ n8n | damage_description, severity, image_base64 |
| Employee uploads receipt for expense report | Custom Webhook โ Zapier | amount, vendor, date, image_base64 |
| Visitor sends product photo for identification | MCP Server (inventory API) | detected_product, detected_sku |
| Patient sends lab results photo | Custom Webhook โ Make | patient_name, extracted_values, image_base64 |
| Field technician sends equipment photo | MCP Server (maintenance system) | equipment_id, issue_description |
Compatibility
- โ All AI providers (OpenAI, Claude, Gemini)
- โ Floating and inline widgets
- โ Shortcode and global widget
- โ Works alongside all other features (RAG, tools, lead capture, etc.)
- โ AI Tools: Custom Webhooks, MCP Servers
- โ Automation platforms: Zapier, Make, n8n (via webhooks)