Zen Cart Logo
Forums / Setting Up Categories, Products, Attributes / Can we customize the DOWNLOAD Folder ?

Can we customize the DOWNLOAD Folder ?

Views: 801

Results 1 to 6 of 6
3 Jul 2015, 4:20 PM
#1
prabhatm avatar

prabhatm

New Zenner

Join Date:
Jun 2015
Location:
Delhi, India
Posts:
32
Plugin Contributions:
0

Can we customize the DOWNLOAD Folder ?

Typically the Zencart has a download folder, where we need to put all the PDF files for the DOWNLOADABLE option.

But once the user downloads a PDF file once, he is able to predict the Download directory and has direct access to the files. So it's becoming futile to make a paid downloadable distribution.

Any way to create our own customized DOWNLOAD directory through the zen cart admin ?

Prabhat

3 Jul 2015, 6:49 PM
#3
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,081
Plugin Contributions:
56

Re: Can we customize the DOWNLOAD Folder ?

... and pulling from the article that stevesh pointed to above, which version of "Download" are you using? If you use Download by Redirect (the default), then what you're describing is not possible since each time the download is requested a new temporary file is created within your /pub directory from which that download is sourced.

3 Jul 2015, 8:02 PM
#4
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Can we customize the DOWNLOAD Folder ?

prabhatM:

Typically the Zencart has a download folder, where we need to put all the PDF files for the DOWNLOADABLE option.

But once the user downloads a PDF file once, he is able to predict the Download directory and has direct access to the files. So it's becoming futile to make a paid downloadable distribution.

Any way to create our own customized DOWNLOAD directory through the zen cart admin ?

Prabhat

Why not modify the .htaccess file like so and leave the folder where it is?:

# but now allow just *certain* necessary files:
#<FilesMatch "(?i).*\.(zip|gzip|pdf|mp3|swf|wma|wmv|wav|epub|ogg|webm|m4v|m4a)$">
#  Order Allow,Deny
#  Allow from all
#</FilesMatch>
3 Jul 2015, 8:15 PM
#5
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Can we customize the DOWNLOAD Folder ?

lat9:

... and pulling from the article that stevesh pointed to above, which version of "Download" are you using? If you use Download by Redirect (the default), then what you're describing is not possible since each time the download is requested a new temporary file is created within your /pub directory from which that download is sourced.

True if using the code to download, but I found the same problem on my site... Was able to enter the direct path to a file in the download folder where the download folder had not been moved outside of the public folder until the above .htaccess modification was applied. (Using download by redirect).

Filename of the original file is provided once received and therefore, going to mysite / download /filename downloads the file... :/

6 Jul 2015, 5:58 PM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Can we customize the DOWNLOAD Folder ?

Yes, to prevent all access to the /download folder, you'll need to relocate it as per the FAQ article, or modify the /download/.htaccess file.