You are here

function backup_migrate_destination_browser_upload::load_file in Backup and Migrate 8.2

Same name and namespace in other branches
  1. 8.3 includes/destinations.browser.inc \backup_migrate_destination_browser_upload::load_file()
  2. 6.3 includes/destinations.browser.inc \backup_migrate_destination_browser_upload::load_file()
  3. 6.2 includes/destinations.browser.inc \backup_migrate_destination_browser_upload::load_file()
  4. 7.3 includes/destinations.browser.inc \backup_migrate_destination_browser_upload::load_file()
  5. 7.2 includes/destinations.browser.inc \backup_migrate_destination_browser_upload::load_file()

File load destination callback.

Overrides backup_migrate_destination::load_file

File

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

Class

backup_migrate_destination_browser_upload
A destination type for browser upload.

Code

function load_file($file_id) {
  backup_migrate_include('files');
  if ($file = file_save_upload('backup_migrate_restore_upload')) {
    $out = new backup_file(array(
      'filepath' => $file->uri,
    ));
    backup_migrate_temp_files_add($file->uri);
    return $out;
  }
  return NULL;
}