Skip to content

Read file from server

Reads one file of up to 50 MiB from an SFTP or FTPS server into a run-scoped file.

@lainstack/file-server/read-file · Object storage

Use Read file from server to download one file from an SFTP or FTPS server and keep it as a file of the run. Pass File to blocks that take a file, such as Parse CSV, Extract document text or Validate XML. Use List files on server first when you do not know the path.

Good to know:

  • The file contents are never placed in the block output, only the File and its Size.
  • Files larger than 50 MiB fail the step. There is no partial read.
  • A path that does not exist, or that names a folder, fails the step.
  • File path is exact, not a pattern. It is relative to the connection’s root folder and cannot start with http://, https://, sftp://, ftp:// or ftps://.
  • Reading leaves the file on the server. Use Move file on server or Delete file on server afterwards if it should not be picked up again.
Setting Key Type Details
SFTP or FTPS connection (required) credentialId Connection Uses the selected SFTP or FTPS connection. At most 255 characters.
File path (required) path Text Path relative to the connection’s root folder.
Output Path Type
File file Value
Size size Number

Last updated: