1

I am using Wordpress and Easy Digital Download plugin to sell digital files.

I have the following how-to questions:

  1. How to avoid a user to see or to use direct download link?
  2. How to create a download link that has an expiration like session?
  3. How to secure a wp-contents/uploads folder?
HappyCoding
  • 641
  • 16
  • 36
URaff Joseph
  • 25
  • 2
  • 6

4 Answers4

1

You might be interested in this: deny direct access to a folder and file by htaccess

simply put a .htaccess file with the content "deny from all" in the folder. Then only scripts from your webspace should be able to read files from there.

This should be a first step. You would need a php-file serving the data instead of accessing those files directly. Eg like this: http://www.kavoir.com/2009/05/php-hide-the-real-file-url-and-provide-download-via-a-php-script.html

(as I am not aware of wordpress plugins, maybe just google for them, this explains how to write those in php - if you cant do that youre pretty much stuck to wordpress plugins)

Community
  • 1
  • 1
Najzero
  • 3,164
  • 18
  • 18
  • Hello, thanks i think i can use this http://www.kavoir.com/2009/05/php-hide-the-real-file-url-and-provide-download-via-a-php-script.html on my plugin that im using – URaff Joseph Oct 15 '12 at 07:49
  • about on .htaccess, can i use "deny from all" on a folder that has s subfolder and that sub folder will cant access too? example on wordpress i upload the path will be wp-contents/uplods/ – URaff Joseph Oct 15 '12 at 07:51
  • I believe that is standard behavior... just set it to the "uploads" folder, later having the date-time subfolders. That .htaccess should rule down and include the 'deny from all'. In fact, you would need to place .htaccess in the subfolders to overwrite the one from the parent directory if i remember correctly – Najzero Oct 15 '12 at 08:44
1

Nah, Nah, Nah... It's easy man update your plugin, and check your settings...

Step 2. You will see in you plugin settings, that it has 24 hours expiration date download link in forwarded email

el_coder
  • 11
  • 7
0

"WP Secure Links" is WordPress plugin at codecanyon that lets you create a secure link to downloadable files.

http://codecanyon.net/item/wp-secure-links/4418678

http://sixthlife.net/product/wp-secure-links/

for securing the uploads folder needs some good .htaccess work check the comments section of this, its explained

Anupam Rekha
  • 180
  • 9
0

Still relevant in 2020 so I have written a small plugin that enables secure and temporary downloads in Wordpress:

WP DISPATCHER

It is free and simple. Check it out :)

tertek
  • 890
  • 1
  • 10
  • 20