I am beginner in Operating Systems related stuff. I am working on a project. In this project, I want to know if user is uploading any confidential document on Internet via websites like Gmail ,etc. I don't want to use proxy or networking techniques for this.
If user uploads document to any website, the native FileChooser Dialog opens in any Operating System through which file to be uploaded is selected and opened. I want the path of the file chosen through this native FileChooser Dialog. Once I get the path, I can know through some logic (can't share it), if that file is confidential or not. File Chooser Dialog
So, I just want to know, how can I get the path of file that user has selected in FileChooser Dialog.
What I have done - Made Custom Dialog in Java but can't find a way to replace native OS dialog by this custom dialog. I also found the GNOME module for FileChooserDialog but I have no clue on how to proceed after it. I have visited all SO questions but they are not specific to my requirement.
I want a code (any language) or script based solution to this. Please help.
Operating System - Any GNOME based Linux Distribution (preferably Ubuntu)