Hey folks …
I have a Resource set up as follows:
With the CSV content type as follows:
This resource is used to output a list of MODX users to a CSV file at:
and works perfectly.
Further to this I’d like to be able to make a copy of this file to the local [hosting] filesystem on request via a snippet.
The problem is that PHP doesn’t seem to recognise
https://mydomain.com/users.csv as an actual file.
file_exists( 'https://mydomain.com/users.csv' )
Is this just a limitation of serving files in this way? Or is there some other way I can configure the resource to be recognised?
As always - I’m very grateful for any thoughts.