Downloadable files

Hello community! I’m looking forward to give to the users a downloadable file in some of my blogs. How can I do this with ghost?

Hey there! You’re best off uploading such files to another place so you have better control over them and can maintain them. Check out the download for anchor elements though as this will allow you to add a download link to your Ghost site

I also have this need. Using an external source for downloadable files is a bit of a pain for some people. For example. I made a site for a friend and used Ghost because it is a great way for her to just write her blog posts. The editor is perfect for her. But if she wants to include a PDF for readers to download, she won’t know what to do. I will have to write a help file that she will lose or ignore and she will give up and just send it to me and ask me to do it for her because its too hard.

Does anyone know of an easy-to-use service for managing external files?

You could use Dropbox? Dropbox can give you public sharing links to files you upload.

Hi again @DavidDarnes

I want to give paying users the opportunity to download a pdf for an article, so I would like to do something like this:

{{#if @ member.paid}}
   <a href="" download="/path/to/file.pdf"> Download pdf </a>
{{/If}}

I would like to prevent access to this link in other ways. For example, someone might discover the link of the site. Or simply the user who is no longer paying saves the link. Then he opens the browser and writes domain.com/path/to/file.pdf and downloads it.

Is there any way to solve this?

I hope I was clear.

Your syntax appears to be a little broken, should be like this:

{{#if @member.paid}}
   <a href="/path/to/file.pdf" download>Download PDF</a>
{{/if}}

For added security you could password protect the file and provide the password to members only. Dropbox has an option for this: How to set shared link permissions - Dropbox Help

1 Like

Yes sorry, I wrote it quickly without paying any attention, it was to make you understand the example of what I want to do.

The password could be a solution but I would like to block the download to the user who is no longer paying. Or the password should be unique for each user and cannot work when the user is no longer paying.

Also protect the file with dropbox request a paid account. In this test phase I would like to find a different solution.

I did a simple tutorial to cover my own needs, please let me know if this helps:

https://ghostportal.co/post-downloads/

2 Likes

Hello! I noticed the URL you posted is dead, anyway to get this tutorial up again? :)

Thanks!

Perhaps something relevant may appear in the next few days.

2 Likes

Ghost now offers a tutorial on Lead Magnets/file upload (& partially-hidden pages, a la Substack): How to use lead magnets to grow an audience

You can modify the default email signup on the Page editor…

And if you’re looking to send it in a welcome email on signup (requires some Zapier/emailer integration): Custom email series: welcome / retention / renewal

Or just send the user to a Welcome Page (this is built in!): Ghost email subscription welcome page/autoresponder - #8 by gjdickens

Hope this saves y’all some time like it did me!

1 Like