You are here

function file_resup_file_insert in File Resumable Upload 8

Same name and namespace in other branches
  1. 7 file_resup.module \file_resup_file_insert()

Implements hook_file_insert().

1 call to file_resup_file_insert()
file_resup_file_update in ./file_resup.module
Implements hook_file_update().

File

./file_resup.module, line 392

Code

function file_resup_file_insert($file) {

  // drupal_write_record() cannot write a file size greater than 2 GB on 32bit
  // platforms.
  if ($file->filesize > PHP_INT_MAX) {
    db_query('UPDATE {file_managed} SET filesize = :filesize WHERE fid = :fid', array(
      ':filesize' => $file->filesize,
      ':fid' => $file->fid,
    ));
  }
}