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.

MFox MFox Full-stack professional senior engineer (15+years). Extensive experience in software development, qa, and IP networking. 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. Simon A. Simon A. I'm a backend developer building APIs, emulators, and interactive game systems. Professionally, I've developed Java/Spring reporting solutions, managed relational and NoSQL databases, and implemented CI/CD workflows. legrab legrab I'll fill this later 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. Daniel Vázquez Daniel Vázquez Software Engineer with over 10 years of experience on Startups, Government, big tech industry & consulting. Stanislav Prigodich Stanislav Prigodich 15+ years building iOS and web apps at startups and enterprise companies. I want to use that experience to help builders ship real products - when something breaks, I'm here to fix it. zipking zipking I am a technologist and product builder dedicated to creating high-impact solutions at the intersection of AI and specialized markets. Currently, I am focused on PropScan (EstateGuard), an AI-driven SaaS platform tailored for the Japanese real estate industry, and exploring the potential of Archify. As an INFJ-T, I approach development with a "systems-thinking" mindset—balancing technical precision with a deep understanding of user needs. I particularly enjoy the challenge of architecting Vertical AI SaaS and optimizing Small Language Models (SLMs) to solve specific, real-world business problems. Whether I'm in a CTO-level leadership role or hands-on with the code, I thrive on building tools that turn complex data into actionable value. Omar Faruk Omar Faruk As a Product Engineer at Klasio, I contributed to end-to-end product development, focusing on scalability, performance, and user experience. My work spanned building and refining core features, developing dynamic website templates, integrating secure and reliable payment gateways, and optimizing the overall system architecture. I played a key role in creating a scalable and maintainable platform to support educators and learners globally. I'm enthusiastic about embracing new challenges and making meaningful contributions. Matthew Butler Matthew Butler Systems Development Engineer @ Amazon Web Services

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