• Resolved herjafader

    (@herjafader)


    Hi
    The plugin seems to work great, but I am building a download function, and trying to add files to a zip archive.
    This works when the file is not protected, but when it’s protected it can’t be added to the archive.
    Is there any way around this?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author BWPS Team

    (@buildwps)

    Hi @herjafader,

    Thanks for reaching out to us.

    To assist you better, may we know how you’re adding files to ZIP archives now, e.g. running a script?

    It’s best if you could provide us with more details about that process.

    Which PDA version are you using now, by the way?

    You might also want to send these details to our support email – hello(at)preventdirectaccess.com so that our team can support you faster.

    Thread Starter herjafader

    (@herjafader)

    Hi

    I use the free version of PDA and it’s the latest version.

    This is the code for adding files:

    $zip = new ZipArchive();
    $zipfile = "test.zip";
    
    if ($zip->open($zipfile, ZipArchive::CREATE) === true)
    {
        $zip->addEmptyDir("Folder 1");
    
        echo $zip->addFile("../../uploads/2022/10/test.mp4", "Folder 1/test.mp4");
    
        $zip->close();
    }

    This works great when not PDA protected.
    Any help would be great 🙂

    Plugin Author BWPS Team

    (@buildwps)

    Thanks for the information, @herjafader.

    It looks like an expected behavior.

    Our PDA plugin helps you protect files against direct access.

    Your custom script doesn’t have permission to access your protected files, so it can’t get files to add to ZIP archives.

    We have a solution to grant custom script access to protected files, which is available in our PDA Gold version.

    Could you please drop us an email at hello(at)preventdirectaccess.com so that our team can assist you in this matter faster?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Add to Zip’ is closed to new replies.