You are here

function ResourceUpload::load in D7 Media 6

File

resource/resource.module, line 465
Resource API for Drupal, a replacement for files.

Class

ResourceUpload

Code

function load($source) {
  if (isset(self::$files[$source])) {
    return self::$files[$source];
  }

  // attempt to save the upload.
  if ($file = self::save_upload($source)) {
    return new ResourcePublic($file);
  }
}