Skip to main content
Grammar, spelling, etc - thanks and cheers are not encouraged
Source Link
Mołot
  • 21.9k
  • 8
  • 59
  • 112

I'm migrating images from urls.URLs and I'm mapping the image field with this code:

$this->addFieldMapping('field_image', 'titlePhotos')
     ->xpath('/photo/@URL');
$this->addFieldMapping('field_image:source_dir')
     ->defaultValue(DRUPAL_ROOT . '/sites/default/files/images');
$this->addFieldMapping('field_image:file_class')
     ->defaultValue('MigrateFileUri');

I want to overwrite files if they already exit when running the migration for the first time and on update.

I'm using Drupal 7.

Cheers!

I'm migrating images from urls. I'm mapping the image field with this code:

$this->addFieldMapping('field_image', 'titlePhotos')
     ->xpath('/photo/@URL');
$this->addFieldMapping('field_image:source_dir')
     ->defaultValue(DRUPAL_ROOT . '/sites/default/files/images');
$this->addFieldMapping('field_image:file_class')
     ->defaultValue('MigrateFileUri');

I want to overwrite files if they already exit when running the migration for the first time and on update.

I'm using Drupal 7.

Cheers!

I'm migrating images from URLs and I'm mapping the image field with this code:

$this->addFieldMapping('field_image', 'titlePhotos')
     ->xpath('/photo/@URL');
$this->addFieldMapping('field_image:source_dir')
     ->defaultValue(DRUPAL_ROOT . '/sites/default/files/images');
$this->addFieldMapping('field_image:file_class')
     ->defaultValue('MigrateFileUri');

I want to overwrite files if they already exit when running the migration for the first time and on update.

I'm using Drupal 7.

added 23 characters in body; edited tags
Source Link
Miguelos
  • 145
  • 1
  • 1
  • 11

I'm migrating images from urls. I'm mapping the image field with this code:

$this->addFieldMapping('field_image', 'titlePhotos')
     ->xpath('/photo/@URL');
$this->addFieldMapping('field_image:source_dir')
     ->defaultValue(DRUPAL_ROOT . '/sites/default/files/images');
$this->addFieldMapping('field_image:file_class')
     ->defaultValue('MigrateFileUri');

I want to overwrite files if they already exit when running the migration for the first time and on update.

I'm using Drupal 7.

Cheers!

I'm migrating images from urls. I'm mapping the image field with this code:

$this->addFieldMapping('field_image', 'titlePhotos')
     ->xpath('/photo/@URL');
$this->addFieldMapping('field_image:source_dir')
     ->defaultValue(DRUPAL_ROOT . '/sites/default/files/images');
$this->addFieldMapping('field_image:file_class')
     ->defaultValue('MigrateFileUri');

I want to overwrite files if they already exit when running the migration for the first time and on update.

Cheers!

I'm migrating images from urls. I'm mapping the image field with this code:

$this->addFieldMapping('field_image', 'titlePhotos')
     ->xpath('/photo/@URL');
$this->addFieldMapping('field_image:source_dir')
     ->defaultValue(DRUPAL_ROOT . '/sites/default/files/images');
$this->addFieldMapping('field_image:file_class')
     ->defaultValue('MigrateFileUri');

I want to overwrite files if they already exit when running the migration for the first time and on update.

I'm using Drupal 7.

Cheers!

Source Link
Miguelos
  • 145
  • 1
  • 1
  • 11

How can I override images on migration?

I'm migrating images from urls. I'm mapping the image field with this code:

$this->addFieldMapping('field_image', 'titlePhotos')
     ->xpath('/photo/@URL');
$this->addFieldMapping('field_image:source_dir')
     ->defaultValue(DRUPAL_ROOT . '/sites/default/files/images');
$this->addFieldMapping('field_image:file_class')
     ->defaultValue('MigrateFileUri');

I want to overwrite files if they already exit when running the migration for the first time and on update.

Cheers!