Thanks for the reply. The first value of 205.44kb, is displayed for all 60 values that I loop through. I know the spec sheet and manual values are updating properly through the loop though.
I agree that if the url is correct the call to niceSize should work?
I didn’t use a standard directory setup so I am trying to call a pdf in a upper directory.
content/products/manuals/productmanual.pdf
The spec file is in content/products/fp/bb/spec.pdf
Both pdfs are found from my txt file yaml array but niceSize still problem. This is result after trying above:
Thanks
Well, you have to get the correct path to the file, if it is not in a child page, the above code will indeed not work. I think you should save the correct path to the files in your content file.
I guess I should back up. I am getting one file size and that is from the first pdf in the content folder of original txt file when I use my original method. I am accessing the info incorrectly I am sure.
Product1:
File1: products/manuals/98-0002-08led-bar-bb.pdf
Fiile2: bb/BB-1004.pdf which is 125.7 kb.
I have two issues. One is that the first pdf file size is always displayed in spite of 30 products in loop. The second problem is accessing the folder of manuals in a higher directory.
Any thoughts?
Thanks
I thought about this again, and it is better, to remove the path from the file field (so just put the filename there) and get the file/file size like this: