Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Updated PI docs

  • Loading branch information...
commit fe191e2a504c7ccae0e78b767089de5637a1e538 1 parent 295dc28
@bliswebagency authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  pi.download_file.php
View
3  pi.download_file.php
@@ -104,10 +104,11 @@ public static function usage()
This addon will serve a file as a file, not a page. This means PDF's will download automatically. It also goes some way in hiding where all these files live on your server.
Step 1. Insert this in a template (e.g. /site/download/):
-{exp:download_file:serve restricted="mydomain.com" prepend="mysite_"}
+{exp:download_file:serve restricted="mydomain.com" prepend="mysite_" remove_path="/assets/"}
Note: only use the restricted parameter if you want to prevent hotlinking
Note: only use the prepend parameter if you want to add a string to the front of the files you are serving
+Note: if you don't use "remove_path" the path to your files will be viewable within the filename
Step 2. Bang this in your link:
<a href="{exp:download_file:link file='/downloads/file.pdf' template='/site/download' remove='http://mydomain.com'}">Download</a>
Please sign in to comment.
Something went wrong with that request. Please try again.