You are here

public function FeedsFileFetcher::afterImport in Feeds 7.2

Overrides FeedsFetcher::afterImport().

Overrides FeedsFetcher::afterImport

File

plugins/FeedsFileFetcher.inc, line 320
Home of the FeedsFileFetcher and related classes.

Class

FeedsFileFetcher
Fetches data via HTTP.

Code

public function afterImport(FeedsSource $source) {

  // Immediately delete the file after import, if requested.
  if (!empty($this->config['delete_uploaded_file'])) {
    $source_config = $source
      ->getConfigFor($this);
    if (!empty($source_config['fid'])) {
      $this
        ->deleteFile($source_config['fid'], $source->feed_nid);
      $source
        ->setConfigFor($this, $this
        ->sourceDefaults());
    }
  }
}