Collaborative filepaths - technical/dev question

I have nc set up in an environment with a dozen users all sharing the same files (mostly). The users have moved from Samba shares and some are on Ubuntu and some are on Windows 10. They access files using the OSs’ built in webdav file system mounting.

Under samba people could share filepaths to files over email, or in documents, like

\\servername\sharename\path\to\file.odt

(I wrote a helper app in ubuntu to deal with slashes etc.)

Under nextcloud, filepaths are much more varied, and what is generated for one user is not helpful to another user for finding the file.

I was wondering if it’s possible to construct a URL from a local filepath. This could be either:

  1. a “direct link” (e.g. https://example.com/f/123455). This is great because it’s short and works for anyone (regardless of whether their access to that file might be accessed over a different path or not). However it’s not so helpful for users who have mounted the share because they can’t see the filepath, so finding the file locally requires following the link to get the path.

  2. or, if possible, a link that includes the path like https://example.com/apps/files/nice/path/to/file or something similar. While I realise that the filepath might change between users (e.g. because of shares), this would be ideal because humans can see the filepath, but it would still work (if it’s possible, that is!) like an internal direct link to locate the file.

I am a capable programmer in PHP, Python, Bash, and can sometimes fight with windows batch scripts too, so am willing to use any of those skills to find a solution, but I’m really asking what’s possible rather than wanting to make a huge change to nextcloud or anything like that!

Thanks in advance.