Add --replace or --force option to DO load task to allow uploads to replace existing digital objects
|Category:||CLI tools||Estimated time:||5.00 hours|
|Target version:||Release 2.6.0|
|Google Code Legacy ID:||Tested version:||2.6|
Currently, in the digital object load task, if the task encounters a description that already has a digital object attached, it will either skip the import entirely, or create a new stub child description to attach the secondary object.
This enhancement will add a new option to the command-line task. When used, if a target description already has a digital object, the existing object will be deleted and replaced with the new object.
#4 Updated by Steve Breker 7 months ago
Added --replace option to the digital object load task.Notes:
- Added the ability to have a 'slug' column instead of 'identifier' or 'information_object_id'. Column header should be 'slug' to use this feature. Note that the slug column matching is case sensitive - this is necessary if users have AtoM's 'fancy' slug generation setting turned on.
- When a digital object is replaced, the digital object file being replaced on disk will be deleted from the uploads folder unless another digital object is referring to the same image on disk. This includes derivatives.
- Users cannot use the '--replace' and '--attach-only' options at the same time. This will generate the error: 'Cannot use option "--attach-only" with "--replace".'
- If the import CSV contains one image for a specific description and the description specified in the CSV does not have a DO attached to it, this digital object will be imported and linked.
- If the import CSV contains one image for a specific description and the description specified in the CSV already has one attached, the attached digital object will be deleted and the one specified in the CSV will be imported and linked.
- If the import CSV contains MORE THAN ONE image for a specific description, and the description does not yet have a DO directly linked to it, the LAST IMAGE SPECIFIED IN THE CSV FOR THIS DESCRIPTION will be linked to the description.
- If the import CSV contains MORE THAN ONE image for a specific description, and the description does already has a DO directly linked to it, the existing image will be deleted and the LAST IMAGE SPECIFIED IN THE CSV FOR THIS DESCRIPTION will be linked to the description.
#7 Updated by Dan Gillean 6 months ago
- Status changed from QA/Review to Verified
- % Done changed from 0 to 100
- Requires documentation deleted (
- Tested version 2.6 added
Docs updated in 2.6. branch: https://github.com/artefactual/atom-docs/commit/9f9d16344db94787bff5333e06feac31321c3547