Batch replace

This functionality can be useful if you wish to update a number of resources within ResourceSpace. It will replace the original file and regenerate the previews of any number of resources.

This can be found by going to the admin menu (top right) then choosing "Resources" then "Replace resource batch".

Checked by default, you will have the option to match the new files with the existing resources based on resource id. To do this, you will need to first name all of your replacement files with the id of the resoure each should replace.

batch

If you wish instead to match the new and existing resources using the contents of a metadata field, for example title or original filename, uncheck the above option and select from the dropdown list the field you wish to use.

Having selected your match method, click Start to proceed to the upload screen where you can drag and drop your files. When you start the upload this will automatically replace the original files with those that are being uploaded.

This is also possible for individual resources from the resource edit page. See Editing resources.

This functionality also works alongside the CSV upload plugin which allows you to quickly create a large number of resources by uploading the metadata, batch replace can then be used to add the file itself. Commonly a filename (mapped to a filename field) is specified in the CSV Upload in order to make this batch upload easier. To specify this mapping untick the "Match filenames with resource IDs" and use the drop down to select the field in the resources that will match the incoming filenames.

Additional options:

  • Ability to specify that only resources in a collection are replaced. Useful if you have a larger number of resources and duplicate filenames are likely
  • Ablity to specify minimum and maximum resource IDs to replace. Useful when no collection is available. These values are ignored if a collection is specified
  • Ability to replace resource files with files located in a folder on the server. Intended for system administrators 1
  • EXIF (embedded metadata) extraction is set to OFF by default, irrespective of the configured extraction settings. This is to prevent accidental overwriting of metadata, which can be especially undesirable e.g. after performing a batch replace to add files to resources that have been created by a CSV upload

1Requires configuration option $batch_replace_local_folder to be set and offline jobs to be configured