Links
Comment on page

fileMetadata

To return the metadata, like file name, size and modification date of a file based on a given record and file name
With this function, you can find out the metadata of a file. You will get back:
  • file name
  • file size
  • modification date

Syntax

fileMetadata(nid, string)

Return

JSON

Examples

fileMetadata(record, fileName) To return the metadata, like file name, size and modification date of a file based on a given record and file name.
1
filedata(this, "Invoice_001.pdf")
Result:
{"name":"Invoice_001.pdf","size":95935,"modifiedDate":1661385600000}
1
fileMetadata(this, last(split(text(Invoice), "/")))
Result:
{"name":"Invoice_001.pdf","size":95935,"modifiedDate":1661385600000}
with the file name pulled from the Invoice image field.

See also

item, which extracts a value of an array or an object.
Last modified 1yr ago