Download content depending on URL

When the user clicks url the system should check does content exists in the file system or not. It’s required to download missed content to the container depending on provided URL.
Docker spawner with Jupyter Notebook App is used.

Maybe it’s possible to add some call back to Notebook url resolver. Or it may be done on JupyterHub level?