0

I want to open files from webpage. For example when we try to download a torrent file it redirects us to utorrent app and it continues it work. I also want to open a local file somehow using OS software. Like a video file using pot player. Is there any possible solution for me ,like making a autorun in pc to run that . Anything it may be please help me.

I searched and found a solution to open a software using protocol, but in this way I cannot open a file in that software.

evolutionxbox
  • 3,932
  • 6
  • 34
  • 51
Nafis
  • 1
  • Does this answer your question? [How to open local file from browser?](https://stackoverflow.com/questions/46430889/how-to-open-local-file-from-browser) – JonSG Jan 06 '23 at 14:07
  • 2
    *"it redirects us to utorrent app"* - That's because the installed application has configured the host to handle a certain protocol (e.g. `magnet://`). This is controlled from that application's installation, not from the web page. Replicating this behavior would involve the user installing your custom application (or browser plugin) on their machine first. – David Jan 06 '23 at 14:07

2 Answers2

0

Opening a specific file in a specific software would usually depend on passing some URL parameters to the protocol-URL of the app (e.g., opening a file in VSCode would use a URL like vscode:///Users/me/file.html, but this functionality would have to be explicitly handled by the app itself though, so the solution for each app would be different).

Otherwise, if the app doesn't support opening a specific file itself through a URL, you'd have to use some scripting software (e.g. AppleScript if you're on macOS) to dynamically click/open certain programs on a user's computer.

0

the link acts as a magnet so your torrent application is opened maybe delete torrent for sometime till you finish the project, i know how to open image in local files in html but it will only be visible to you, you can do audio and video files also using <source src="movie.mp4 and on next line `type="video/mp4">

  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jan 06 '23 at 19:05