Well, the comment said server access happens through a REST API, so I assumed it would have some for of "get file" call.
This call needs to support paths with environment variable for this to work properly.
Ah, yes, missed that. So there must be some server-side code running, and that's where the environment variable needs to be resolved.