File downloads for paid members only

I’m seeking guidance on setting up the following use case in Ghost. Instead of offering articles, my product consists of PDF and Excel files containing data that users can subscribe to. I want to make file links accessible to anyone, but when someone clicks on a link to open or download a file, they should be prompted to log in. Crucially, only paid members should be able to complete the download.

To clarify, visibility isn’t a concern—both the download pages and links can be public. However, Ghost should restrict the actual file downloads to paid members. Is this functionality possible with Ghost? Thank you!

I think It cant be done…

Thank you for your answer.
Do you think that I should repost my question in the “Developer help” sub-forum? Maybe someone there can point me in the right direction to implement this myself.

Yes. You have to post in the right place. Someone with strong knowledge could help you.

A better option would be to use LemonSqueezy or Gumroad. Ghost doesn’t restrict users’ access to media files. LemonSqueezy or Gumroad are designed for selling digital goods, and supports one-time purchase and subscriptions. You can embed the product links into a Ghost blog.

1 Like

If you host your files on Bunny CDN you can “sign” the download link for Paying Members, and only signed links will respond with a download.

A little bit of hacking in Ghost, but not brain surgery. Also needs a little javascript to create the signed URL

 {{#if @member.paid}}
 Create and display signed Download-URL
 {{/if}}

The link can be valid for one download, so even if someone shares it it will only work once, you can also make it valid for 24 hrs or similar.

Here is the documentation…
Token authentication (bunny.net)

PM if you want help plugging this in on your site.

In a similar vein, you can use javascript to get the member JWT and pass it to a worker that responds with the file or a signed link