MODX3 Can't download files from Media Browser when basePath & baseURL are set

I’m finding that right click “Download” on a file works fine if the Media Source basePath & baseURL are blank, ie. the files are in the root of the File system, however if I create sub directories and set the basePath & baseURL to eg. images/headshots/ the files won’t download. I just get a blank page with the error “Cannot open file: /images/headshots/bill.jpg” - all else works fine, I can upload & delete files but not download. Worked fine on MODX 2.8 but not 3.0.0

Anyone else have this problem?

I can reproduce the problem.

It seems that the basePath is added to the file path twice:

When the processor “Browser/File/Download” is called, the basePath is already prepended to the “file” parameter and then gets added again (function prefixPath in core/vendor/league/flysystem/src/PathPrefixer.php).

I created an issue for this on github.

Fantastic… Thank you!