upload_total_space_used

modules/upload/upload.module, line 376

Versions
4.7 – 7
upload_total_space_used()

Determine how much disk space is occupied by uploaded files.

Return value

The amount of disk space used by uploaded files in bytes.

Code

<?php
function upload_total_space_used() {
  return db_result(db_query('SELECT SUM(f.filesize) FROM {files} f INNER JOIN {upload} u ON f.fid = u.fid'));
}
?>
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.