For the complete documentation index, see llms.txt. This page is also available as Markdown.

Using Front-End File Uploads in SmartForms

FormWise allows you to enable file uploads in SmartForms, so your end users can upload PDFs, CSVs, and TXT files to be processed by AI in real-time. This is useful for:

โœ… Summarizing long documents (contracts, reports, research papers). โœ… Extracting key data from structured files (CSV spreadsheets, customer records). โœ… Generating AI-powered insights based on user-provided information.

However, large files, too many uploads, or combining file uploads with web browsing & web scraping can cause timeouts. This guide covers best practices for setting up SmartForms with file uploads and how AI processes this data.


1๏ธโƒฃ How Front-End File Uploads Work in SmartForms

When a SmartForm includes a file upload field, your end users can: ๐Ÿ”น Upload PDFs, CSVs, or TXT files directly into the form. ๐Ÿ”น Have AI process the fileโ€™s content and generate a response based on the text. ๐Ÿ”น Receive a personalized AI-generated output based on their uploaded document.

๐Ÿ’ก Example Use Cases:

  • A legal firm: Uploads a PDF contract and AI extracts key clauses.

  • A financial advisor: Uploads a CSV with expense data and AI generates a budget plan.

  • A real estate agent: Uploads a property listing and AI writes a marketing description.

Ensure you actually add the front-end uploaded data source to your prompt instruction. See screenshot below.


2๏ธโƒฃ Best Practices for Front-End File Uploads

๐Ÿ”น File Size Limits by Plan

๐Ÿ“Œ Pro Plan โ€“ 2MB max per file (multiple files allowed). ๐Ÿ“Œ Agency Plan โ€“ 20MB max per file (multiple files allowed).

๐Ÿš€ You can attach multiple files, but larger files or too many files can lead to token issues and timeouts.

๐Ÿ”น Number of Files Limit

โœ… There is no hard limit on the number of uploaded files. ๐Ÿšจ However, too many files at once can cause AI to hit token limits, making responses incomplete or failing to generate.


3๏ธโƒฃ How AI Processes Uploaded Files (RAG in Simple Terms)

๐Ÿ”น What Happens When a User Uploads a File?

1๏ธโƒฃ The AI reads the fileโ€™s text and extracts key details. 2๏ธโƒฃ The AI retrieves the most relevant information when responding. 3๏ธโƒฃ AI does not "train" on the fileโ€”it only references the text during that session.

๐Ÿ’ก This is called Retrieval-Augmented Generation (RAG)โ€”think of it like a smart document search, where AI pulls out the most relevant data when needed.

๐Ÿšจ If an uploaded file is too large or contains too much information, AI may struggle to find the most relevant text, leading to slow or incomplete responses.


4๏ธโƒฃ How Files Are Stored for End Users

โœ… Files are temporarily stored in the user's browser cookies. โœ… If they refresh the page, their uploaded files will still be there for that session (so they donโ€™t need to re-upload). โœ… Once they leave the session, the files are no longer stored.

๐Ÿ“Œ This improves the user experience, allowing them to navigate within the tool without losing their uploaded data.


5๏ธโƒฃ Avoiding Timeouts & Optimizing Performance

๐Ÿ”น If your SmartForm is timing out: โœ… Reduce file sizes (split large PDFs into sections). โœ… Limit the number of uploaded files per request. โœ… Avoid combining uploads with web browsing or web scraping in the same request. โœ… Ensure smartform prompts are structured to retrieve only necessary information from the file.

๐Ÿ“Œ Example Fix: โŒ Bad: "Analyze the entire 50-page PDF and provide a full summary." โœ… Better: "Find and summarize the key financial terms from the contract PDF."

๐Ÿš€ By following these best practices, you ensure AI tools process user uploads efficiently without timeouts.

Last updated