Client.upload.file() and Client,download.file() will transfer one single file to or from the Server. Be aware that your LN user will need to have access rights on the file. The LN user may be the single sign on user used defined in ttams0100m000 if you are using SSO (I'm not quite sure, but better check it anyway).
Here the way I did downloading a file in a session script:
|Download file in LNUI.
if tc.is.html.ui() then
ret = client.download.file(source.path, "TEXT", "p" & ttadv230.cmod(1;3)
& strip$(ttadv230.cprs) & "0"
if ret <> 0 then
message("error: %d", ret)
message("Download von " & source.path & " in LNUI")
- source file name (name of file on server; needs the path in the filename as far as I can tell)
- mime.type (optional)
- target file name (optional; name of file on client; I'm using it without any given path, so it's file name only)
I've also used uploading in a session I migrated from FP8+:
tmp.file = bse.tmp.dir$()&"/importlist.txt"
if tc.is.html.ui() then |AT#05.sn
client2server(filepath, tmp.file, true, false, false)
Here filepath is a field on the mask, where you need to enter the source filename (it's the name of the file on the client). Well, that's the definition given in the programmers guide, I didn't use this functionality. If filepath is empty LNUI will show a little dialog where you can search or enter a filename (that's what I'm using right now).