0

How do you get the filesize of the file when using Matrix?

{downloads}
  {download_name} {file_size} {size}
{/download}

returns

Download name {file_size} {size}

Thanks

0

It looks like you need to use the particular file as a tag pair around file_size. Something like this:

{downloads}
  {download_name} {download_file}{file_size}{/download_file}
{/downloads}
5
  • Thanks, tried the above and it does return the filesize but it also returns the file name as well http://path/to/file53289
    – user742736
    Sep 24 '14 at 0:03
  • Simply remove {download_file} from Laura's answer. Sep 24 '14 at 0:55
  • When I remove {download_file} the {file_size} will return {file_size}
    – user742736
    Oct 15 '14 at 1:26
  • I have to said I'm getting different results with my original code. Can you provide your code for us to look at? Oct 15 '14 at 15:02
  • I guess @LauraMontgomery wanted you to remove the {download_name}.
    – Sobral
    Apr 21 '15 at 22:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.