• Hi there,
    Im using WP-Hide (https://www.wp-hide.com/) and the rewrite from /wp-content/uploads/* to another url, for example /media/* causes the download upon goal completion to not download correctly.

    Are you aware of anything/hack that can be done to circumvent this issue without having to disable the wp-hide plugin?

    thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor richardgabriel

    (@richardgabriel)

    Hey @ilovecake!

    Thanks for using our plugin!

    I’m not aware of anything specifc to WP-Hide, however in our most recent update we added the option to not rewrite our download URL (ie, use the direct link instead of streaming the download.)

    I believe this may help address your issue. The top result on this page has instructions to follow:
    https://goldplugins.com/documentation/before-after-documentation/before-after-faqs/

    Can you let me know if that helps?

    All the best,
    Richard

    Thread Starter ilovecake

    (@ilovecake)

    Thanks, this works. Unfortunate that the direct URL is exposed, but, for now, this is better than nothing.

    For the future, could you potentially still pass the file through a download php file, without streaming. This should still maintain a masked url to the file:

    
    $file_url = 'https://someUrlHere.com/media/somefile.pdf';
    
    header("Pragma: public");
    header("Expires: 0");
    header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
    header("Cache-Control: public");
    header("Content-Description: File Transfer");
    header("Content-Type: ");
    header("Content-Length: " .(string)(filesize($file_url)) );
    header('Content-Disposition: attachment; filename="'.basename($file_url).'"');
    header("Content-Transfer-Encoding: binary\n");
    
    readfile($file_url); // outputs the content of the file
    
    exit();
    
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Rewrite plugins breaks download’ is closed to new replies.