Lovable storage

Large File Downloads Timing Out in Lovable App

Users trying to download large files (PDFs, exports, media) from your Lovable app experience timeouts, incomplete downloads, or connection resets. The download starts but never completes, or fails with a network error.

This commonly happens with generated reports, data exports, or media files that exceed a few megabytes. The download may work fine for small files but consistently fail for anything larger.

The problem is worse on mobile connections and may appear as a spinning indicator that never completes or a partially downloaded corrupt file.

Error Messages You Might See

net::ERR_CONNECTION_RESET Download failed - network error Function execution timed out Error: The operation was aborted
net::ERR_CONNECTION_RESETDownload failed - network errorFunction execution timed outError: The operation was aborted

Common Causes

  • Serverless function timeout — Edge functions have execution time limits (typically 10-30 seconds) that large downloads exceed
  • File loaded into memory — The entire file is read into memory before sending, instead of being streamed
  • No resume support — If the connection drops, the download must restart from the beginning
  • CORS on storage URLs — Direct storage URLs may not have proper CORS headers for browser downloads

How to Fix It

  1. Use signed URLs for direct download — Generate a temporary signed URL from Supabase Storage and redirect users to it instead of proxying the file
  2. Stream large files — If you must process the file, use streaming instead of loading it entirely into memory
  3. Add download progress indicators — Show users how much has been downloaded so they know the download is working
  4. Set appropriate timeouts — Increase function timeouts for download endpoints, or bypass serverless functions entirely

Real developers can help you.

BurnHavoc BurnHavoc Been around fixing other peoples code for 20 years. AUXLE AUXLE I am a Full Stack Developer experienced in building Websites, Web apps and Cross Platform Mobile Apps for Startups and Companies. hanson1014 hanson1014 Full-stack developer experienced in fixing and deploying AI-generated apps from Lovable, Bolt.new, Cursor, and Replit. I specialize in debugging Supabase integration issues (auth flows, RLS policies, database connections), fixing broken deployments, resolving routing/blank screen problems, and cleaning up messy React/Vite codebases. I also build production apps with the Claude API and have shipped a Mac desktop dev tool (Nexterm from scratch. Based in Hong Kong, fast turnaround. Bastien Labelle Bastien Labelle Full stack dev w/ 20+ years of experience 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. Vlad Temian Vlad Temian 15+ years shipping production infrastructure for startups. Former CTO at qed.builders (acquired by The Sandbox). Cursor ambassador and agentic tooling builder. I've scaled systems, automated deployments, and built observability tools for AI coding workflows. I specialize in taking vibe-coded apps from broken prototype to production-ready: fixing Supabase auth/RLS, Stripe integrations, deployment pipelines, and cleaning up AI-generated spaghetti. I build tools in this space (agentprobe, claudebin, micode) and understand both sides: how AI generates code and why it breaks. https://blog.vtemian.com/ Jacek Rozanski Jacek Rozanski Senior PHP/Symfony developer and DevOps engineer with 20+ years of professional experience, running opcode.pl (web development agency, est. 2004). Day job: I'm the sole backend developer at merketing company where I own and maintain 11 PHP/Symfony microservices on AWS (ECS Fargate, RDS, S3, CloudFront), handle the full CI/CD pipeline (Bitbucket Pipelines, Docker), and manage monitoring with Sentry and CloudWatch. These services handle high request volumes in production every month. What I bring to AI-built apps: - I audit and fix security issues (OWASP methodology), performance bottlenecks, and architectural problems in codebases generated by Cursor, Claude Code, Lovable, Bolt, and v0 - I refactor AI-generated prototypes into production-grade applications with proper error handling, testing, and clean architecture (SOLID, DDD, hexagonal architecture) - I set up the infrastructure AI tools don't touch: AWS hosting, CI/CD pipelines, automated deployments, database optimization, monitoring, and alerting - I integrate external services: payment providers, email systems, partner APIs, SSO/auth Tech stack: PHP 8.x, Symfony, React, Next.js, PostgreSQL, MySQL, Docker, AWS (ECS, RDS, S3, SQS/SNS, CloudFront), Terraform, Supabase. I also use AI tools daily (Claude Code, Cursor) in my own workflow, so I understand both the strengths and the gaps in AI-generated code. Based in Poland (CET timezone). Available for async work and calls during EU/US business hours. Pratik Pratik SWE with 15+ years of experience building and maintaining web apps and extensive BE infrastructure Krishna Sai Kuncha Krishna Sai Kuncha Experienced Professional Full stack Developer with 8+ years of experience across react, python, js, ts, golang and react-native. Developed inhouse websearch tooling for AI before websearch was solved : ) 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)

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

What's the maximum file size I can serve?

There's no hard limit on file size in Supabase Storage, but serverless functions typically have a 50MB response body limit and 10-30 second execution limits. Use signed URLs for files larger than a few MB.

Why do downloads work on WiFi but not mobile?

Mobile connections are slower and more prone to disconnections. Without resume support, a brief connection drop means the entire download fails and must restart.

Related Lovable 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