-
Notifications
You must be signed in to change notification settings - Fork 4
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
Allow links without public URLs #17
Comments
Thanks for inquiring! The short answer is "no", Digital Download does not currently support cloud assets without a public URL. It is a technical limitation of how the downloads work, unfortunately. However, I hadn't seen the Thanks for the tip. I'll take a deeper dive into our options, and let you know what I find. 👍 |
Shoot, didn't mean to close that. 😄 |
Thanks for your help. Let me know if there's anything you need from me, happy to help where I can |
@lindseydiloreto +1 for this request to allow the plugin to work for Assets that do not have a public URL. We have this very same use case via https://servd.host/docs/storing-private-files which the site owner wants to use to store secure documents in the CMS. Your plugin then generates downloads on these files for logged-in users, but it won't work with your plugin using the public URL which doesn't exist. Even if you cannot execute on this immediately, I'd really appreciate confirmation on (1) whether you intend to do this and (2) an estimated ETA on when it might be delivered. Note that we are already pulling files from a private Asset Volume to include as email attachments, so I've included a snippet of relevant code below to show how we handled that in case the same technique can be applied here:
|
Hi there,
Are you able to confirm if generating links for assets without a public URL is supported?
I see a few mentions of it being supported in previous issues but it still doesn't seem to be the case. I can see the following code here that seems to confirm it not being supported:
It is a valid and common use case to have files that shouldn't have public URLs but still need to be served to a client. In my case I am using S3 file storage and need to protect downloads from unauthenticated users, leeching/hotlinking, search engine indexing etc.
I haven't done enough investigation to fully test a fix, and there might be much better ways to handle this, but could we use Craft's native "getCopyOfFile()" method to download a copy of this file to a temp directory before serving it to the client, thus removing the need to have public URLs? I tested this and it seems to work.
I would say there's potential downsides to this solution:
Maybe you or someone else has a way better idea for handling this use case?
Other plugins (like LinkVault) seem to handle it in this way but unfortunately it has been abandoned so I'm trying to get this plugin to work for my specific needs.
Craft: 4.8.9
DigitalDownload: 2.3.0
The text was updated successfully, but these errors were encountered: