Wordpress plugins
Private Uploads

Private Uploads

Version : 0.1.2
Tested up to : 5.1
Number of download : 181
Author : Chris Dennis
Average rating : 5 / 5 on 1 votes 1 votes, 5 avg.rating

Screenshots

Private Uploads
Private Uploads
Private Uploads
Private Uploads

‘Private’ uploaded files (PDFs, images, etc.) will normally be only included in private posts and pages. But the files themselves can still be accessed by anyone if they know the corresponding URLs. For example, a PDF file’s URL might be http://example.com/wp-content/uploads/minutes-20160924.pdf and anyone could download that file because WordPress does not get a chance to check their authorisation. The solution that the Private Uploads plugin uses involves moving any private files to a separate folder, and then configuring the web server to ask WordPress to authenticate access to files in that folder. So the file’s URL might now be http://example.com/wp-content/uploads/private/minutes-20160924.pdf and an HTTP server rewrite rule will convert this to http://example.com/?pucd-folder=private&pucd-file=minutes-20160924.pdf The Private Uploads plugin will intercept that URL and reject it with a 403 status code. This plugin is more efficient than some similar ones because it only has to run when serving files in the private folder(s): the web server handles other uploaded files (ones not in the private folders) directly. Requirements Sufficient access to the web server to allow the required configuration. Acknowledgements This plugin was inspired by a discussion on StackExchange. Future Plans Currently, access to private files just depends on the is_user_logged_in() function. This plugin could be developed to give more fine-grained control, such as having a folder for each user.

Download now