Batch PDF download: 404 error (v5.2.14-C56)

UPDATE:

Sorry @david about my last screenshot, I actually was looking into /storage, not into /public/storage.

public/storage does indeed have the directories it’s supposed to have, at least when it comes to standard invoices, file attachments and logos:

To confirm that IN is properly linked to its storage I just tried adding a document to an expense: everything works fine; I can access it though IN and I can see it in the /public/storage/documents with the default server configuration (no /public in the app url).

That being said, there is no sign of the directory the IN email points to, it seems like it was never created in that form (I also tried checking for hidden files).

So then I tried looking for the file the URL is pointing to, which is in this case 2021-07-27_Factures.zip.

Well, I did find it, it was buried here:

/public/storage/sAyYOHFwghChDSRWxvKQIKPNXRIRQ9SYrdgto4SGenIHt82gUfbLSkc3ABTTfHwM/7ve6t7J5b8lzJlJpNSXZEmVMX80bWfpyBGAF08MJ/VOJYlbIpy3a0M75S27NI7BjXmKAhqztwykxYv8Wo/invoices/2021-07-27_Factures.zip

Now the automated email sends me here:

/public/storage/sAyYOHFwghChDSRWxvKQIKPNXRIRQ9SYrdgto4SGenIHt82gUfbLSkc3ABTTfHwM/1evJRh8Du1TZUYIaFb5jnParjQEuQ5FcVj3vH8RL/8zg1xsHFT3ISACy72RJKBct37q4AG1wufYWQ7RzI/invoices/2021-07-27_Factures.zip

At first glance, both URLs look the same, but they actually differ after the forward slash following the first set of random characters. So:

/public/storage/sAyYOHFwghChDSRWxvKQIKPNXRIRQ9SYrdgto4SGenIHt82gUfbLSkc3ABTTfHwM/ is the common bit between the two URLs and that points to an existing directory.

But then the second part of the email URL
/1evJRh8Du1TZUYIaFb5jnParjQEuQ5FcVj3vH8RL/8zg1xsHFT3ISACy72RJKBct37q4AG1wufYWQ7RzI/invoices/2021-07-27_Factures.zip simply does not exist on my server.

What does exist is /7ve6t7J5b8lzJlJpNSXZEmVMX80bWfpyBGAF08MJ/VOJYlbIpy3a0M75S27NI7BjXmKAhqztwykxYv8Wo/invoices/2021-07-27_Factures.zip

So basically I think I found a bug… the batch download command does create a proper zip file containing the appropriate files that were batch selected, but then the email supposedly linking to this zip file is pointing instead to a non existent subfolder, while still having the first and the last part of the URL right.

Thanks for looking into this!