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.

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.** Bastien Labelle Bastien Labelle Full stack dev w/ 20+ years of experience legrab legrab I'll fill this later Tejas Chokhawala Tejas Chokhawala Full-stack engineer with 5 years experience building production web apps using React, Next.js and TypeScript. Focused on performance, clean architecture and shipping fast. Experienced with Supabase/Postgres backends, Stripe billing, and building AI-assisted developer tools. 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. 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. ISHANTDEEP SINGH ISHANTDEEP SINGH Senior Software Engineer with 7+ years of experience in React, JavaScript, TypeScript, Next.js, and Node.js. I’ve also worked as a tech lead for startups, owning end-to-end technical execution including architecture, development, scaling, and delivery. I bring a strong mix of hands-on coding, product thinking, and technical leadership, and I’m comfortable building products from scratch as well as improving and scaling existing systems. Jared Hasson Jared Hasson Full time lead founding dev at a cyber security saas startup, with 10 yoe and a bachelor's in CS. Building & debugging software products is what I've spent my time on for forever Kingsley Omage Kingsley Omage Fullstack software engineer passionate about AI Agents, blockchain, LLMs. 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.

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