See my question and answer again, you linked it already in your question:
simple solution for restricting access to (some) uploads/downloads
The solution isn’t that hairy the only necessity – besides configuring the plugin correct – is to create a .htaccess
, which you could do programmatically. For that you have to automate the creation of the .htaccess
file inside the configured folder of wp-downloadmanager. On the other hand, you obviously read that…
You might want to take a look at this solution:
https://github.com/mattheu/Private-Media
Related Posts:
- Protecting direct access to PDF and ZIP unless user logged in (without plugin)
- How to protect uploads in multisite if user is not logged in?
- Adding attachment custom field metadata to TinyMCE tag
- controlling whether upload is attached to post or not
- How to Protect Uploads, if User is not Logged In?
- How to Fix HTTP Error When Uploading Images?
- Extend Media Library
- WordPress 3.5: Setting custom “full URL path to files” in the Media Library?
- simple solution for restricting access to (some) uploads/downloads
- How to show all available images in WP’s media library when using the Polylang plugin?
- Which filters or actions to use after a media upload and delete?
- How to wp_upload_bits() to a sub-folder?
- “Add Media” only shows “Full Size” under Attachment Display Settings
- Where do the favicons for Media Files come from
- Is it possible to trigger some JavaScript when Media Popup is opened?
- How to call WP3.5 Media Library manager?
- How to get all files inserted (but not attached) to a post
- Append button to WordPress Image Details modal
- WP3.5 Media Uploader – how to make it accept multiple images?
- How to disable WordPress Media resize different size version?
- Media library storing files in uploads not folders within in uploads
- Add select field to media uploader that adds a class to the image
- How to host different file formats/types for a media attachment without creating multiple attachments?
- Site icons with alpha channel for self-hosted WordPress blog network
- How to retrieve alt attribute for an attachment (uploaded image)?
- How do I get allowed Media Library upload file extension list?
- Cannot upload .mp3 file to wordpress media
- Images not being generated at correct size
- Switch between tabs on “Insert Media” dialog
- Use the WP media uploader dialog for uploading a form attachment (non-admin). Offering progress and drag and drop feedback
- Restrict WordPress Media Library for a specific user role (users can only see/select own media)
- Display attachments by the ID of the post being edited in the wp.media frame (frontend)
- move_uploaded_file() not working on wordpress front end
- WordPress Issue : The uploaded file could not be moved to wp-content/uploads/
- Convert (-) and (escape) signs to (_) when uploading files on wordpress media library automatically
- Using wp_enqueue_media() with switch_to_blog() issue
- making media URL secured
- How to get the return value of wp.media({ frame: ‘post’ }) in all cases?
- Media library only shows for admin. Doesn’t show editor or below [closed]
- Is it safe to allow non-admin users access to media uploader
- What is the way to add additional fields to attachments in 3.5+?
- How to load attachment in media library for current user?
- upload_max_filesize is set to 64 MB already but WordPress is still showing 2 MB
- PHP error when trying to upload .mp3 files via Media Library [closed]
- Get images attached to a specific page
- A link (not in the post) to download a specific PDF file
- How does WordPress decides how many sizes of an image to create?
- Migrating media files (documents only) to a fresh install and maintaining the same directory structure
- How does wordpress handle media files?
- WordPress media upload issue could not insert attachment into the database
- Thumbnail images missing in WP media library
- Open Media Uploader Link in single post or page
- Remove Media File Items From Server That Do Not Exist in Media Library
- Add SWF file to wordpress through custom template
- Insert attachments from custom uploader into post (regular uploader style)
- What if I have a large file on the server that I want the wp library to have?
- Uploaded images result in a file url with full path on disk appended
- Using WP-CLI “wp media import” to sync files to the media library
- Efficient way to move media folder to another folder
- Do custom post type (CPT) attachments/media store the parent post ID?
- Make inline uploader (plupload) on options page upload to a specific folder
- Images not displaying on site or media library
- Replicate Media Galley Edit view in Add Media View
- How to Protect Uploads, if User is not Logged In?
- Front-End Upload media with category
- How to manually set an attachment in a post?
- Media Library: Remove replace images of selected author
- What is wrong with my wp_insert_attachment code?
- How to upload multiple images using WP rest API to media?
- Media not displaying other users uploads – WordPress 4.9.2
- Check if author or uploader id of the attachment(uploaded) image is match?
- Limit attachment caption characters
- Organizing the Media Library for Cleanup
- Issues with WordPress 3.9.6 media libraries on XAMPP
- Insert media while posting is not working with new wordpress update
- How to split my uploaded media into directories?
- Attachment Metadata not updated while uploading audio files
- wordpress 3.6 media manager cropping timestamp
- How to properly move media files and update data?
- Image in binary in the data to WordPress media library
- How can I bulk delete media and attachments using WP-CLI?
- Change URLs for static content
- Add suffix to filename of uploaded images
- How to safely allow user upload on CPTs?
- Duplicate Custom Header Functionality into the post edit screen
- Why would media_sideload_image() not work locally?
- Uppload image from another source wp.media
- Prevent small image sizes from being uploaded
- Protecting uploads not working
- What is the alternative to “ when it comes to calling Media (image) files in the ‘attachment.php’ file?
- How To Watermark Audio
- Error: The uploaded file exceeds the upload_max_filesize directive in php.ini [duplicate]
- Upload multiple image with media_handle_upload with multiple file field [duplicate]
- How Do I Change the File Permission For Uploaded Files in WordPress?
- WordPress media has all disappeared on wp-admin but still on the server
- unsharp thumbnails after uploading image
- image not display in media library and thumbnail not display in post
- Using Gravity Forms to upload media into library, then attach to post
- Set featured link not showing
- Broken Media Library