Bolt storage

File Upload Broken After Deploying Bolt App to Production

File uploads in your Bolt.new application work perfectly during development in the WebContainer but fail completely after deploying to production. Users see upload spinners that never finish, error messages about failed requests, or files that appear to upload but are never saved.

This is one of the most common deployment issues with Bolt apps because the WebContainer environment handles file storage differently than production hosting. Files stored locally during development have no persistent storage on serverless platforms like Vercel or Netlify.

The issue can manifest in several ways: uploads timeout with 413 or 504 errors, files are saved but disappear after deployment redeploys, or the upload endpoint returns CORS errors that didn't exist in development.

Error Messages You Might See

413 Request Entity Too Large Error: ENOENT: no such file or directory, open '/tmp/uploads/...' 504 Gateway Timeout during file upload StorageApiError: new row violates row-level security policy TypeError: Failed to fetch (upload request)
413 Request Entity Too LargeError: ENOENT: no such file or directory, open '/tmp/uploads/...'504 Gateway Timeout during file uploadStorageApiError: new row violates row-level security policyTypeError: Failed to fetch (upload request)

Common Causes

  • Local file system storage in serverless — Bolt generated code that saves files to the local filesystem (fs.writeFile), which is ephemeral on serverless platforms
  • Missing cloud storage configuration — No Supabase Storage, AWS S3, or Cloudinary configuration for production file hosting
  • File size limits on hosting platform — Vercel limits request body to 4.5MB, Netlify to 1MB by default, causing large uploads to silently fail
  • CORS not configured on storage bucket — The cloud storage bucket doesn't allow uploads from your production domain
  • Missing multipart form parsing — The API route doesn't parse multipart/form-data correctly in the production runtime

How to Fix It

  1. Switch to cloud storage — Replace local filesystem storage with Supabase Storage: const { data, error } = await supabase.storage.from('uploads').upload(filePath, file)
  2. Configure upload size limits — For Vercel, add to vercel.json: { "functions": { "api/**": { "maxDuration": 60 } } } and use streaming uploads for large files
  3. Set up CORS on storage bucket — In Supabase dashboard, configure the storage bucket to allow your production domain origin
  4. Use presigned URLs for large files — Generate a presigned upload URL on the server and upload directly from the browser to storage, bypassing your API
  5. Add proper error handling — Wrap upload logic in try-catch and return meaningful error messages instead of generic 500 errors

Real developers can help you.

Sage Fulcher Sage Fulcher Hey I'm Sage! Im a Boston area software engineer who grew up in South Florida. Ive worked at a ton of cool places like a telehealth kidney care startup that took part in a billion dollar merger (Cricket health/Interwell health), a boutique design agency where I got to work on a ton of exciting startups including a photography education app, a collegiate Esports league and more (Philosophie), a data analytics as a service startup in Cambridge (MA) as well as at Phillips and MIT Lincoln Lab where I designed and developed novel network security visualizations and analytics. I've been writing code and furiously devoted to using computers to make people’s lives easier for about 17 years. My degree is in making computers make pretty lights and sounds. Outside of work I love hip hop, the Celtics, professional wrestling, magic the gathering, photography, drumming, and guitars (both making and playing them) rayush33 rayush33 JavaScript (React.js, React Native, Node.js) Developer with demonstrated industry experience of 4+ years, actively looking for opportunities to hone my skills as well as help small-scale business owners with solutions to technical problems Jaime Orts-Caroff Jaime Orts-Caroff I'm a Senior Android developer, open to work in various fields Nam Tran Nam Tran 10 years as fullstack developer Luca Liberati Luca Liberati I work on monoliths and microservices, backends and frontends, manage K8s clusters and love to design apps architecture Richard McSorley Richard McSorley Full-Stack Software Engineer with 8+ years building high-performance applications for enterprise clients. Shipped production systems at Walmart (4,000+ stores), Cigna (20M+ users), and Arkansas Blue Cross. 5 patents in retail/supply chain tech. Currently focused on AI integrations, automation tools, and TypeScript-first architectures. Taufan Taufan I’m a product-focused engineer and tech leader who builds scalable systems and turns ideas into production-ready platforms. Over the past years, I’ve worked across startups and fast-moving teams, leading backend architecture, improving system reliability, and shipping products used by thousands of users. My strength is not just writing code — but connecting product vision, technical execution, and business impact. Caio Rodrigues Caio Rodrigues I'm a full-stack developer focused on building practical and scalable web applications. My main experience is with **React, TypeScript, and modern frontend architectures**, where I prioritize clean code, component reusability, and maintainable project structures. I have strong experience working with **dynamic forms, state management (Redux / React Hook Form), and complex data-driven interfaces**. I enjoy solving real-world problems by turning ideas into reliable software that companies can actually use in their daily operations. Beyond coding, I care about **software quality and architecture**, following best practices for componentization, code organization, and performance optimization. I'm also comfortable working across the stack when needed, integrating APIs, handling business logic, and helping transform prototypes into production-ready systems. My goal is always to deliver solutions that are **simple, efficient, and genuinely useful for the people using them.** Franck Plazanet Franck Plazanet I am a Strategic Engineering Leader with over 8 years of experience building high-availability enterprise systems and scaling high-performing technical teams. My focus is on bridging the gap between complex technology and business growth. Core Expertise: 🚀 Leadership: Managing and coaching teams of 15+ engineers, fostering a culture of accountability and continuous improvement. 🏗️ Architecture: Enterprise Core Systems, Multi-system Integration (ERP/API/ETL), and Core Database Structure. ☁️ Cloud & Scale: AWS Expert; architected systems handling 10B+ monthly requests and managing 100k+ SKUs. 📈 Business Impact: Aligning tech strategy with P&L goals to drive $70k+ in monthly recurring revenue. I thrive on "out-of-the-box" thinking to solve complex technical bottlenecks and am always looking for ways to use automation to improve business productivity. Basel Issmail Basel Issmail ’m a Senior Full-Stack Developer and Tech Lead with experience designing and building scalable web platforms. I work across the full development lifecycle, from translating business requirements into technical architecture to delivering reliable production systems. My work focuses on modern web technologies, including TypeScript, Angular, Node.js, and cloud-based architectures. I enjoy solving complex technical problems and helping teams turn product ideas and prototypes into working platforms that can grow and scale. In addition to development, I often collaborate closely with product managers, business analysts, designers, and QA teams to ensure that solutions align with both technical and business goals. I enjoy working with startups and product teams where I can contribute both as a hands-on engineer and as a technical partner in designing and delivering impactful software.

You don't need to be technical. Just describe what's wrong and a verified developer will handle the rest.

Get Help

Frequently Asked Questions

Why do uploads work locally but not in production?

In Bolt's WebContainer, files are stored in the local filesystem which is always available. In production on serverless platforms (Vercel, Netlify), the filesystem is read-only or ephemeral. You need to use cloud storage like Supabase Storage or AWS S3.

What is the maximum file size I can upload on Vercel?

Vercel's serverless functions have a 4.5MB request body limit. For larger files, use presigned URLs to upload directly to your storage bucket from the browser, bypassing the serverless function entirely.

Related Bolt Issues

Can't fix it yourself?
Real developers can help.

You don't need to be technical. Just describe what's wrong and a verified developer will handle the rest.

Get Help