How to open remote file URL (e.g. index.html) directly in browser?

Advertisement

manuel_songokuh
Joined:
Posts:
10

How to open remote file URL (e.g. index.html) directly in browser?

I'm using WinSCP to manage files on my remote server.
I have an index.html file in my remote directory. I would like to right-click on it and choose an option like "Open in browser" (e.g. Firefox), so it opens the file's public URL directly.

I have already created a WinSCP extension for that.
The URL it opens is:
http://ftp.example.com/txxxxx/xxxx/index.html
(because my session is logged in to ftp.example.com)

But I actually want the URL to be:
http://example.com/txxxxx/xxxx/index.html

I can't figure out how to change this behavior in the extension. Any idea how to fix it?

Thanks!

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
42,274
Location:
Prague, Czechia

Re: How to open remote file URL (e.g. index.html) directly in browser?

If you need help with your extension, we need to see its code.

Though, there's already Generate HTTP URL Extension, which does exactly what you need.
Just specify the your web hostname in Web server hostname override box.

Reply with quote

manuel_songokuh
Joined:
Posts:
10

Thanks! Now it's clear how to configure the extension, and it's working perfectly.

However, I have a few usability suggestions that could improve the user experience:
  1. Show in top-level context menu
    Currently, to use Generate HTTP URL, I have to do:
    Right-click > Custom commands on file > Generate HTTP URL
    That’s too many steps for such a frequent action.
    Please consider adding an option like:
    “Show in top-level context menu”
    So the command can appear directly in the right-click menu, without going through submenus.
  2. Add “Open in Browser” button in confirmation window
    After generating the URL, the confirmation popup only shows these buttons:
    OK – Copy – Help
    It would be very helpful to have a fourth button:
    Open in browser
    So I can instantly launch the URL without needing to copy/paste, especially when auto-launch is disabled.

Reply with quote

Advertisement

You can post new topics in this forum