• Hello,

    I have used this plugin to essentially allow members to download related documents. The page these documents are located is restricted to members only (With a login). However, simply copying the link and opening in incognito mode allows you to view or download the file without restriction.

    Is there a way to prevent non-members from viewing or downloading the file, even if they have the link sent to them? I see the encryption feature, but that only masks the URL.

    Many thanks,
    Jon.

Viewing 1 replies (of 1 total)
  • Plugin Author dFactory

    (@dfactory)

    If you use the encryption the download links are masked using a salt unique to your website. This should be enough to have unique links not possible to decode by attachment id.

    If you want to disable downloading for logged out users you can use “da_process_file_download” filter hook – check if user is logged in, if not return false or redirect him/her to a url you prefer (using WP functions like wp_redirect).

    If you want to have unique download url’s for each logged in user you can that too with “da_encrypt_attachment_id” and “da_decrypt_attachment_id” filter hooks. These hooks allow you to change the encryption method (for example by additionally hashing the url with a username). And if you want it to be unique for every user, logged in or a guest, you can additionally hash it with the user IP.

    So lot’s of options. They require some custom coding, but are totally doable.

Viewing 1 replies (of 1 total)
  • The topic ‘Download restriction’ is closed to new replies.