Using a Protocol URL Address to open a file for editing

Advertisement

ben_
Guest

Using a Protocol URL Address to open a file for editing

I'm trying to add a link via a userscript to a web interface, that opens a certain file for editing when clicked. The relevant part of the documentation seems to be here:

If path part is included and it ends with slash (/), WinSCP starts with the path as initial remote directory. If the path part does not end with slash, the file (or directory) specified by it is downloaded.

What actually happens is that whether or not the path ends in a slash, the directory is opened on the correct host but nothing is downloaded. How can I make a link in the following form open a file for editing when clicked?

<a href="winscp-sftp://ben@hostname.com/home/ben/path/to/file.txt>test</a>

The linked documentation mentions adding ;save after a URL to trigger that action, so I tried adding some possibly-relevant commands in the same format eg ;edit or ;get, with no change in results.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
31,609
Location:
Prague, Czechia

Re: Using a Protocol URL Address to open a file for editing

Your URL looks good. It works for me (in this format).
Though note that it only displays a download dialog.
It won't download the file automatically.
And it's not possible at all to open a file for editing using an URL.

Reply with quote

Advertisement

You can post new topics in this forum