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.
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 🙂
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?