Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support real private files #9

Open
Mark-H opened this issue Jun 15, 2021 · 4 comments
Open

Support real private files #9

Mark-H opened this issue Jun 15, 2021 · 4 comments

Comments

@Mark-H
Copy link
Member

Mark-H commented Jun 15, 2021

Currently the files option requires files to be publicly accessible, as DigitalProduct will either redirect or download them through curl.

To allow private files to be restricted (htaccess, outside webroot, etc) and only allow them to be downloaded by the module if the appropriate products were purchased, a new download method needs to be added with readfile() or a media source integration.

@isaacniebeling
Copy link

I think we've generally done this using static resources -- although we're still on MODX 2.8.1, so maybe that breaks with the updates to file handling in 2.8.2 (or 3? I can't remember, but I know you do 😬)

@Mark-H
Copy link
Member Author

Mark-H commented Jun 15, 2021

The static resource still has to be publicly accessible (for a download with the DigitalProduct extension) or you need to set up a usergroup for each unique product (related to #11).

@isaacniebeling
Copy link

Ah, interesting. I guess I was thinking of a single purchase enabling multiple resources (and/or downloads) via usergroups.

@Mark-H
Copy link
Member Author

Mark-H commented Jun 15, 2021

Already possible. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants