You are here

function backup_migrate_destination_browser_load in Backup and Migrate 5.2

Browser upload destination callback.

1 string reference to 'backup_migrate_destination_browser_load'
backup_migrate_backup_migrate_destination_types in includes/destinations.inc
Implementation of hook_backup_migrate_destination_types().

File

includes/destinations.browser.inc, line 22
Functions to handle the browser upload/download backup destination.

Code

function backup_migrate_destination_browser_load($destination, $file_id) {
  require_once './' . drupal_get_path('module', 'backup_migrate') . '/includes/files.inc';
  if ($file = file_check_upload('backup_migrate_restore_upload')) {
    $filepath = backup_migrate_temp_file($file->filename);
    rename($file->filepath, $filepath);
    $out = backup_migrate_file_info($filepath);
    $out['filename'] = $file->filename;
    return $out;
  }
  return NULL;
}