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.

Jaime Orts-Caroff Jaime Orts-Caroff I'm a Senior Android developer, open to work in various fields Dor Yaloz Dor Yaloz SW engineer with 6+ years of experience, I worked with React/Node/Python did projects with React+Capacitor.js for ios Supabase expert legrab legrab I'll fill this later Yovel Cohen Yovel Cohen I got a lot of experience in building Long-horizon AI Agents in production, Backend apps that scale to millions of users and frontend knowledge as well. Daniel Vázquez Daniel Vázquez Software Engineer with over 10 years of experience on Startups, Government, big tech industry & consulting. Antriksh Narang Antriksh Narang 5 years+ Experienced Dev (Specially in Web Development), can help in python, javascript, react, next.js and full stack web dev technologies. David Olverson David Olverson Solo dev shipping production apps with AI-assisted development. I specialize in rescuing broken Lovable/Bolt/Cursor builds and taking them to production. 10+ apps shipped including SaaS CRMs, gaming platforms, real estate tools, and Discord bots. Stack: Next.js 16, TypeScript, Tailwind CSS, FastAPI, PostgreSQL, Prisma. I use Claude Code with 50+ custom skills for rapid delivery. Average turnaround: 2-4 weeks from broken prototype to production. Victor Denisov Victor Denisov Developer Jen Jacobsen Jen Jacobsen I’m a Full-Stack Developer with over 10 years of experience building modern web and mobile applications. I enjoy working across the full product lifecycle — turning ideas into real, well-built products that are intuitive for users and scalable for businesses. I particularly enjoy building mobile apps, modern web platforms, and solving complex technical problems in a way that keeps systems clean, reliable, and easy to maintain. Matthew Jordan Matthew Jordan I've been working at a large software company named Kainos for 2 years, and mainly specialise in Platform Engineering. I regularly enjoy working on software products outside of work, and I'm a huge fan of game development using Unity. I personally enjoy Python & C# in my spare time, but I also specialise in multiple different platform-related technologies from my day job.

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