Hacking Bubble: The Download Hack

Learn how to let users download files from your Bubble app.

Ryan Roberts
October 24, 2016 • 2 minute read
Hacking Bubble: The Download Hack

Let’s say, you are making a cloud and/or sharing service. It would be disappointing to find out after putting in all of that work to make the app, you can’t have your users download an image from your website. At least it was for me, so if this very specific problem has occurred for you too, this article will explain how to make images download onto the user’s computer instead of doing this.

But can’t I just send the user to the file URL, wouldn't that download it for them, you ask?

Nope, probably. If this was any other kind of file, then most likely. We are talking about browsers here, so I can’t talk in absolutes. It’s difficult to assume a general behavior between all browsers as they can behave different from each other.

Okay, then what is probably the solution to this, you add?

This:

Let’s break this down. The <a> tag is for creating a link so we will need that to direct the page to the source image (or any file). The style=”” is a CSS element that you would use to style the button. href=”” is where you would enter the source file URL that the <a> tag will use. You can either copy and paste the static URL between the quotations if the file will not change, or add a dynamic element like I have. Finally, just type download after the href=”<link>”.

The addition of ‘download’ to the end of the href tag makes all of the difference, but then again, browsers, so I don’t know.

Just make an HTML element in Bubble and type this code in. You can change up the color hex, font-size, font-family, etc. Make it entirely how you want it to look. You can learn more about how to CSS in this Introduction to CSS.


Hacking Bubble is a series on how to make Bubble do things it probably wasn’t meant to do.

Don’t miss out on the latest Bubble content by signing up here.

Was this article useful? Do you have a better or different approach? Let me know!

Start building with a free account

Build your app on Bubble's Free plan. No need to upgrade until you're ready to launch your app.

Join Bubble

LATEST STORIES

blog-thumbnail

How to Collect Customer Feedback (and What to Do With It)

Customer feedback helps you prioritize the right improvements and monitor your customer experience. Here’s how to get it and how to use it.

Bubble
January 14, 2025 • 11 minute read
blog-thumbnail

Bubble vs. Caspio: Comparing the Top No-Code Platforms

Caspio is a low-code development tool for building database-centric apps. Bubble’s no-code platform has been used to build and scale more than 4 million applications, from startups to enterprise apps. Here’s how the two platforms compare.

Bubble
January 13, 2025 • 24 minute read
blog-thumbnail

How to Market a Website: 14 Ways to Drive Traffic

Want more visitors to your website? Here’s how to get them.

Bubble
January 10, 2025 • 20 minute read
blog-thumbnail

How to Choose a Brand Name You Won’t Regret

You’re launching a business — but what are you going to call it? Let’s explore the attributes of a strong brand name and a process for coming up with one of your own.

Bubble
January 07, 2025 • 13 minute read

What Can You Build on Bubble? 25 Examples to Inspire You

November 18, 2024 • 19 minute read

The Future of Bubble’s Editor: Introducing the New Workflow Tab

October 11, 2024 • 3 minute read

Efficient App Building 101: Improving Your Workload Usage

July 01, 2024 • 3 minute read

How to Craft Effective Prompts for Bubble’s New AI Page Designer

June 17, 2024 • 4 minute read

Build the next big thing with Bubble

Start building for free