Sidebar

Is there a way to retrieve certain metadata of a file such as file size?

0 votes
83 views
asked Aug 21, 2023 by nathan-b-7857 (330 points)
Looking to see if there's a function like the below:
qie.getFileName();

In which I can retrieve the size of an associated file.

The source connector is an FTP retriever.

1 Answer

0 votes
You can use the length property of message.getBytes() to get the size of the current message in bytes.  For example, the below would store the file size in a variable called fileSize:

var fileSize = message.getBytes().length;
answered Aug 22, 2023 by jon-t-7005 (7,590 points)
...