Get Path of File Selected in FileChooser Dialog in Linux - linux

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)

Related

Browser Detection Download

looking for some help with a rather unique or interesting issue. I am currently in the process of creating a website and would like to implement the following.
I have a download button where the end user can click download - Easy enough.
The complicated part is achieving the following
I would like to provide (automatically) the correct file for the user based on their operating system, so if the user is using windows and clicks the download button the windows file will be downloaded, and the opposite applies for mac.
any help is appreciated.

Drag a file into the app window

I'd like to make an app that can process a user selected file. But instead of just clicking a button and selecting the file, I'd like to make a feature where the user simply drags the file in the window of my app and then it loads the file and does the processing.
I can't find how to do this within Haxe API or OpenFL API, perhaps someone knows how to implement that.
I would like to target Windows, Mac and Neko platforms if it helps with anything.

Lauch external program in firefox or chrome

We have a custom web app in our intranet that allow users to browse and search our shared file system in a way more appropriate for our organization. as compared to windows explorer/mac finder. However, when the users click on, for example, a link pointing to a word document the document is downloaded by the browser and then opened. I am trying to provide a better way, namely that the file is opened directly from the shared folder that each user has mapped in his own computer. This will make things faster and will not pollute the browser download folder.
I was planning to create a chrome or firefox extension that recognizes certain css class attached to a link, remaps the link to the shared file system and and launch an external process. Any idea how to achieve this? Is there a better solution?
If you want the URL to be handled by a custom program you could create special URLs using a custom Protocol (ex: MyApp:// instead of http://) and then register that protocol to be opened via a custom program. The links would only work on computers that have your program installed and where the protocol has been registered to be handled by your application.

Ideas for launching an installed app from a webpage

I am thinking about having the following use-case:
User installs application on local machine.
User goes to our website, and are presented with many links (choices).
User clicks on a link.
Application starts, with some information contained within the link passed to the application.
Step 4 is obviously a security minefield. The end goal is that the user makes a choice, and if the application is installed, it starts with some information passed to it (ie command line parameters, or perhaps a temp file somewhere on the user's machine)
Can I/ Should I access the registry from javascript? Are there any ideas about how I might go about this? Do you have an alternative suggestion?
Assuming the applications the user installs are also developed by you.
Register a file extension for use by the specific application - then your web links can be links to a file that is downloaded and auto-run by your app. The file could contain details on the defaults for your app to use.
Sort of like how clicking on a .pdf file opens your pdf reader.
As an alternative to the file-extension solution you may want to know about Custom Application Protocol feature. Link is for Windows but there are nearly same techniques on other systems. I can't say if this approach works in every browser but you may want to try it out.
Accessing the registry from JavaScript inside a browser is nigh on impossible for the security implications. To access the registry from the web, I'd imagine you'd have to use a binary (C++ or others) program that can read the registry, but also has an HTTP module to communicate with your server.
Sounds like you might need the Click Once deployement feature for your app. I think once it's installed over http there should be a pretty easy way to launch an executable.
http://en.wikipedia.org/wiki/ClickOnce

IExplorer: pop up my own dialog instead of default IExplorer dialog when we trying to load a file from net

I am working on a project which need to customize the default functionality of IEXplorer.
I need to pop up my own dialog instead of default IExplorer dialog(IExplorer run or save dialog window) when we trying to load a file from net.
Is tere any way to do this?
Plz reply.
It's a Local Application.
Are you talking about a WEBSITE? Or a local app? If a website, there is no way to override this dialog, unless you're running a Java or perhaps Flash applet on your webpage. Then you can open dialogs (or "fake" dialogs) all you want. But as far as a native ability to override the built-in dialogs; no. That'd be a giant security risk.

Resources