Get ACF File size and type

Hi,

Is there a way for L&L to get an ACF File size (in Ko…) and type (like PDF, Word…)?

Here’s what i used to do with CCS for the file size.
Looking for a way to do that with L&L.

[array res_pdf_file debug=false]
    Size: [format decimals=0 point=, thousands=.][calc][field filesize]/1000[/calc][/format] KB
[/array]

Thanks for your help

I ended up coding a custom PHP shortcode.

Hi Emmanuel,

The Attachment loop type, which is what ACF File field uses internally, now supports the fields size and type. So it should be possible to do:

<Loop acf_file=field_name>
  File: <Field url /><br>
  Type: <Field type /><br>
  Size: <Field size /><br>
</Loop>

The file size is formatted to be human-readable, with MB, KB, etc.

That’s great, than you @eliot!