I finally could figure out how to do this, without using the Ruby code, thanks to Allan's excellent documentations.:
base=${TM_DROPPED_FILE%.*} title="${base##*/}" echo -n "<a href="http://%24TM_REMOTE_URL/file_download/%5C%24%7B1:file_id%7D%5C" title="${2:$title}">${3:$title}</a>"
However, in order to work this correctly, the file must be dragged slowly. If I drag the file to fast, then the regions for the tab stop variables 1, 2 and 3 will loose track and cease to function correctly, since they are highlighted at unproper positions.
The command is attached.
regards, marios