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.

Luca Liberati Luca Liberati I work on monoliths and microservices, backends and frontends, manage K8s clusters and love to design apps architecture 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. legrab legrab I'll fill this later Bastien Labelle Bastien Labelle Full stack dev w/ 20+ years of experience 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 : ) BurnHavoc BurnHavoc Been around fixing other peoples code for 20 years. 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. Alvin Voo Alvin Voo I’ve watched the tech landscape evolve over the last decade—from the structured days of Java Server Pages to the current "wild west" of Agentic-driven development. While AI can "vibe" a frontend into existence, I specialize in the architecture that keeps it from collapsing. My expertise lies in the critical backend infrastructure: the parts that must be fast, secure, and scalable. I thrive on high-pressure environments, such as when I had only three weeks to architect and launch an Ethereum redemption system with minimal prior crypto knowledge, turning it into a major revenue stream. What I bring to your project: Forensic Debugging: I don't just "patch" bugs; I use tools like Datadog and Explain Analyzers to map out bottlenecks and resolve root causes—like significantly reducing memory usage by optimizing complex DB joins. Full-Stack Context: Deep experience in Node.js and React, ensuring backends play perfectly with mobile and web teams. Sanity in the Age of AI: I bridge the gap between "best practices" and modern speed, ensuring your project isn't just built fast, but built to last. prajwalfullstack prajwalfullstack Hi Im a full stack developer, a vibe coded MVP to Market ready product, I'm here to help Victor Denisov Victor Denisov Developer

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