UIX - How to read file contents OR get file path to open in custom Python app (and then read_file)

Hi,

I'm trying two things and can't really succeed in either of them. I'm using UIX Dashboards to call my display my own web app in iframe.

1) I would like to read the file contents from M-Files Vault. (I select document, I automatically read the file contents and then I display it to the user - basically how file preview works in M-Files).

- How would I go about this? I know there is a function called ReadTextFile in ICommonFunctions, but it requires a file in the application path, so I would still have to figure out how to download the file to the server application path and then read it and then delete it after I switch to another document. It seems that the file preview function in MFiles works a little differently. Could you do the same with just UIX, or do I need something more? Also not sure if ReadTextFile works on formats that are not .txt

2) I would like to get the file path that my Python script can read.

- When a user opens a path like "mfiles://view/{rest of the file path}" or "Z:/DMS/ID/0/{rest of the file path}" it opens the path to the file just fine, but when external applications try to open the path, it seems they cannot even see it. Of course I would understand that they cant use the first format of the path because that is exclusive to M-Files after installation, but what about the classic "{Disk}:/DMS/etc"? Can I somehow read a document externally?

Thank you in advance for any help. Solving either of those problems would be an absolute win for me.

Dominik