• Resolved ultramega

    (@ultramega)


    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/ 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 3 years, 7 months ago by ultramega.
Viewing 1 replies (of 1 total)
  • Thread Starter ultramega

    (@ultramega)

    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.