You are here

function _media_save_file_permanently in D7 Media 7

Sets the status to FILE_STATUS_PERMANENT.

Parameters

$file: A file object.

2 calls to _media_save_file_permanently()
media_add_upload_multiple_submit in includes/media.pages.inc
media_add_upload_submit in includes/media.pages.inc
Upload a file.

File

./media.module, line 1069
Media API

Code

function _media_save_file_permanently($file) {
  if ($file->status < FILE_STATUS_PERMANENT) {
    $file->status = FILE_STATUS_PERMANENT;
    file_save($file);
  }
}