Images, icons & files

How to link to a file so visitors can download it

How to link to a file so visitors can download it

To link to a file from your TeleportHQ site, upload the file in the Assets Manager, right-click it and choose Copy Asset Link to Clipboard. Then select a button or text on your page, add a link, and paste the address into the URL field. Visitors who click it open or download the file.

Before you start

  1. In the left sidebar, click Assets Manager.
  2. At the top of the panel, click the Uploads tab.
  3. Find the file in the Public folder. You can type its name in the Search box.
  4. Right-click the file. (Or point at it and click ⋯.)
  5. Choose Copy Asset Link to Clipboard. You see "Asset link is copied to clipboard".
The right-click menu of an uploaded file in the TeleportHQ Uploads tab, with Copy Asset Link to Clipboard highlighted
  1. On the canvas, select the Download our menu button.
  2. Click the link icon in the small bar above the button, or press Ctrl+K (Cmd+K on Mac). The link panel opens on the URL tab.
  3. Paste the link into the URL field, then press Enter.
  4. Optional: tick Open in a new tab, so your site stays open behind the file.
The TeleportHQ link panel on the URL tab, with the URL field and Open in a new tab highlighted

See How to add links and buttons.

Check that it worked

Links don't open on the editor canvas. Open Preview or your published site and click the button. The file opens or downloads.

Whether a file opens in the browser or downloads is up to the visitor's browser: TeleportHQ stores the file without a "download" instruction. PDFs and images usually open in the browser tab, where visitors can save them. Files a browser can't show, such as .zip or .docx, download.

Troubleshooting

The link stopped working after I deleted or replaced the file The link points to that exact file. If you delete the file, the link no longer opens it. Upload the new file, copy its link, and paste it into the button again.

I want the file to stay hidden until someone clicks Asset links in TeleportHQ are permanent public addresses. Anyone who has the link can open the file, and no sign-in is needed. This includes files in the Private folder, which is for build and configuration files, not for protecting information. Don't upload files that must stay private, and keep passwords and API keys in Secrets. See How to keep passwords and API keys safe (Secrets).

Good to know

  • There's no special "download" link type. A file link is a normal URL link.
  • The link keeps working as long as the file stays in your project. The address is a long code, not the file's name.
  • To offer the file on several pages, paste the same link on each button.
  • Documents such as PDFs always count as used. A picture or video that you only link to (and don't show on a page) is marked as unused in the Assets Manager, so removing unused files would delete it and break the link. See How to rename or delete files (and remove unused ones).
Share

Related Articles

How to upload images, videos and files

To upload files in TeleportHQ, open the Assets Manager's Uploads tab and click + → Upload Assets on the Public folder, or drag files from your computer onto the editor; they appear in the folder, ready to add to your pages, and TeleportHQ warns you when a file is heavy for a web page.

How to add links and buttons

In TeleportHQ, you make any text, image, button or container clickable by selecting it and clicking the link icon above it, then choosing a URL, a page of your site, a section to scroll to, an email address or a phone number.

What is the Assets Manager?

The Assets Manager is the TeleportHQ editor panel (left sidebar, Ctrl/Cmd+4) where you upload, organize and check your project's images, videos, documents, audio and 3D files, and pick free stock photos, videos, 3D models, sounds and icons, in the tabs Uploads, Stock, 3D, Audio and Icons.

What are the Private and Functions folders?

In the TeleportHQ Assets Manager, the Private folder holds developer text files such as next.config.js that are added to the top folder of your generated project, and you show it with the Private Folder switch in Project settings → Editor → Preferences → Advanced features; the Functions folder holds .js files that become server functions at /api/<name> when you publish.

How to rename or delete files (and remove unused ones)

In the TeleportHQ Assets Manager, double-click a file name to rename it, or right-click the file and choose Delete; to free storage in one go, open the command palette and run Delete all unused assets. Deleting a file that's in use replaces it with a placeholder and can't be undone.

Which files can I upload, and how big can they be?

TeleportHQ accepts images (jpg, png, gif, svg, webp, ico), videos (mp4, m4v, mov), documents (pdf, Word, Excel, PowerPoint, zip), audio, .glb 3D models, fonts and text files; trial and Pro plans allow 10 MB per file and 1 GB per project, Premium allows 30 MB per file and 3 GB per project, and smaller files are flagged as heavy when they would slow a page down.