Title: Wrong protected link
Last modified: April 2, 2021

---

# Wrong protected link

 *  Resolved [ultramega](https://wordpress.org/support/users/ultramega/)
 * (@ultramega)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/wrong-protected-link/)
 * Hi,
    First : great plugin. Second : I have a problem. I use PWU with ACF Pro.
   I have a Custom Post Type called Document which contain a upload custom field
   created with ACF (that returns array of the uploaded file). In my functions.php
   file, I added your acf/upload_prefilter code. For displaying the link of the 
   uploaded file, I created a shortcode that gets the data from the array (using
   get_field function from ACF) and then grab the URL to display it. It worked fine
   a while but now, for an unknown reason, it doesn’t work : In the frontend, the
   link is something like [https://www.domainname.com/private/thumbs/filename.ext/](https://www.domainname.com/private/thumbs/filename.ext/)
   and I get a failed upload or an invalid compressed file (depends on the nature
   of the file). Any idea ? Best Regards, Cedric
    -  This topic was modified 5 years, 2 months ago by [ultramega](https://wordpress.org/support/users/ultramega/).

Viewing 1 replies (of 1 total)

 *  Thread Starter [ultramega](https://wordpress.org/support/users/ultramega/)
 * (@ultramega)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/wrong-protected-link/#post-14268235)
 * My mistake : I just forgot to filter the data provided by the ACF get_field function.
   
   Example :
 *     ```
       $document = get_field('document_field', $post_id);
       $protected_link = apply_filters( 'private_media_url_by_array', $document );
       ```
   
 * Again, great plugin.

Viewing 1 replies (of 1 total)

The topic ‘Wrong protected link’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/protect-wp-files_cdced0.svg)
 * [Protect WordPress Uploads](https://wordpress.org/plugins/protect-wp-files/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/protect-wp-files/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/protect-wp-files/)
 * [Active Topics](https://wordpress.org/support/plugin/protect-wp-files/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/protect-wp-files/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/protect-wp-files/reviews/)

 * 1 reply
 * 1 participant
 * Last reply from: [ultramega](https://wordpress.org/support/users/ultramega/)
 * Last activity: [5 years, 2 months ago](https://wordpress.org/support/topic/wrong-protected-link/#post-14268235)
 * Status: resolved