Connects, stores a single file, then quits.
A one-shot convenience over connect that opens a session, runs FtpSession.put, and closes the connection before returning.
Connection, credential, path, data, and optional transfer (type/append/offset) options.
path
data
type
append
offset
If the server rejects the credentials.
If the connection cannot be established.
If the server speaks the protocol incorrectly.
1.0.0
import { putFile } from 'edgeport/ftp';await putFile({ hostname: 'ftp.example.com', username: 'me', password: 'secret', path: '/incoming/report.csv', data: new TextEncoder().encode('a,b,c\n')}); Copy
import { putFile } from 'edgeport/ftp';await putFile({ hostname: 'ftp.example.com', username: 'me', password: 'secret', path: '/incoming/report.csv', data: new TextEncoder().encode('a,b,c\n')});
Connects, stores a single file, then quits.
A one-shot convenience over connect that opens a session, runs FtpSession.put, and closes the connection before returning.