I have a feature where I am using an external resource to create a PDF.
This is kind of funky.
Click on PDF link -> sends info via segments to another EE template which creates output to be placed in the PDF -> calls outside resource to create the PDF based on the source from the template (curl.)
We would like to keep these URL’s hidden so that…
People don’t know where the PDF server is located so they can just go to town creating PDF’s (I know I could do this on the PDF server side with firewalls and other tricks but I don’t want to mess with that right this moment.)
We would like to minimize the possibility of link sharing by having the URL’s expire.
Nothing is critical. Security by obscurity is fine here. I just want some very basic controls.
Hi Brad
Thank you so much for the module. Exactly what i’ve been looking for.
I am having a slight issue with it though. The module will work perfectly if i use a full domain
ie - http://something.com.au/directory/file.zip
If i try to use a custom field storing the url it fails I get an error “Requested file does not exist”
This is the code i am using
{exp:weblog:entries weblog="store"}
{exp:scm_entry_access entry_id="{entry_id}"}
<a href="http://{exp:linklocker">Download</a>
{/exp:scm_entry_access}
{/exp:weblog:entries}
If i remove “{download_url}” and replace it will the full url to the file it works. I have tested the custom field without using the linklocker module at it works.
Any ideas?
Hope you don’t mind me coming in on this one Brad but Yuri what exactly do you have stored in the {download_url} variable. If you are only storing the name of the file (plus its extension of course) then LinkLocker is in fact showing the correct response as it would have no way of knowing where the file is located rather just what the file is called. You would need to then hard-code back in the path to that file in front of your {download_url} variable.
Don’t know if that helps at all.
Best wishes,
Mark
Hi Yuri,
Also something to try if that doesn’t work is to just code the link like this :
Here’s the link
without using the http and domain part. I think (could be wrong though) that Brad updated the module to work with paths instead of domains so that might be worth having a try with also if the full domain doesn’t work. Also don’t forget about the {site_url} variable that will fill in the first part of your domain for you.
Hope that helps.
Best wishes,
Mark
Thanks for the assist, Mark. Almost 100% correct - but I did not update this module to require path only (that was the List Contents plugin).
@Yuri, My only guess would be to make sure that the field storing the url is Text Only, and not XHTML, as it could be adding tags to the URL. Otherwise, I can’t imagine why it may not work for you if you have the full URL to the file. You could try calling the {url} before the link just to make sure it contains the value you expect it to.
Am performing today and tonight, but will try to look at this tomorrow if it is still a problem. Let me know what you find out.
Thanks, Brad
Thanks for the assist, Mark. Almost 100% correct - but I did not update this module to require path only (that was the List Contents plugin).
Oops very good point! It was the List Contents plugin wasn’t it!! 😉 Sorry!!
@Yuri, My only guess would be to make sure that the field storing the url is Text Only, and not XHTML, as it could be adding tags to the URL. Otherwise, I can’t imagine why it may not work for you if you have the full URL to the file. You could try calling the {url} before the link just to make sure it contains the value you expect it to.
Very good point and would have been my next port of call had I not mixed up your two plugins like that!! 😉
Am performing today and tonight, but will try to look at this tomorrow if it is still a problem. Let me know what you find out. Thanks, Brad
What performing is that then Brad?
Best wishes,
Mark
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.