edgeport - v1.0.3
    Preparing search index...

    Function putFile

    • 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.

      Parameters

      • opts: FtpConnectOptions & { data: Uint8Array; path: string } & FtpPutOptions

        Connection, credential, path, data, and optional transfer (type/append/offset) options.

      Returns Promise<void>

      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')
      });