Sum total of upload size for any given record

4 posts by 2 authors in: Forums > CMS Builder
Last Post: February 7, 2013   (RSS)

By dm - February 6, 2013

hi

i am using the following code to add pdf upload file size information to my detail pages

<?php echo round(filesize($upload['filePath']) * .0009765625 * .0009765625, 2).' MB'; ?>

this works great but i was wondering if there is a similiar simple way to give me the sum total size of all uploads for a given record?

many thanks for you help!

e

By gregThomas - February 6, 2013

Hi,

As far as I know, that is currently the best way to get the size of a file. 

Let me know if you have any questions.

Thanks!

Greg

Greg Thomas







PHP Programmer - interactivetools.com

By dm - February 7, 2013

hi greg

this works great to get the filesize of each individual upload within a record, but i was wondering if there is similar code for the total size of all the uploads within a record ie if ten uploads have been uploaded what is the sum total of those ten not just individually if you follow...

cheers!