How to get URL from FTP?

This may sound like a basic question but, I shall dare to ask anyway.

I use DO a lot for accessing my ftp server. I often upload and share files from my ftp. Is there a way to get the HTTP URL of a file easily once I have connected to the FTP with DO?

Up till now I have had to type in the URL manually and double check that it works. Kind of tedious... Any help would be much appreciated. :smiley:

You could write a button to do it. The exact details will depend on the site, since there is no programatic way to map an FTP URL to an HTTP one. Opus has no way to know how the FTP directories are exposed on the HTTP side, but a fairly simple button can take the FTP path, remove some of the parent directories and add on the web URL etc.

Ok, that makes sense. I know how to make a button, but I am not sure how to implement the rest of what you described. How do I go about this?

Maybe something like this (untested):

@nolocalizefiles @nofilenamequoting Clipboard SET http://something/{filepath$|noroot}

Please link your account if you need more help with the command.

I actually found what I was looking for by searching some more.

I made this button, and now it works perfectly! I really love DO!

<?xml version="1.0"?> <button backcol="none" display="both" textcol="none" type="three_button"> <label>Copy paths</label> <icon1>#clipcopy</icon1> <icon2>#printfolder</icon2> <button backcol="none" display="both" textcol="none"> <label>Copy filepaths</label> <tip>Copy filepaths</tip> <icon1>#newcommand</icon1> <function type="normal"> <instruction>Clipboard COPYNAMES=url REGEXP (ftp://|file:///)ftp\.(.*)//(.*) http://www.\2/\3</instruction> </function> </button> <button backcol="none" display="both" textcol="none"> <label>Copy remote filepaths</label> <tip>Copy remote filepaths</tip> <icon1>#newcommand</icon1> <function type="normal"> <instruction>Clipboard COPYNAMES=url REGEXP (ftp://|file:///)ftp\.(.*)//(.*) http://www.\2/\3</instruction> </function> </button> </button>