Skip to content

Commit

Permalink
Merge pull request #7818 from QualitativeDataRepository/IQSS/7817_com…
Browse files Browse the repository at this point in the history
…pare_against_orig_in_replace

Compare against mimetype of orig file in replace (if ingested)
  • Loading branch information
kcondon committed Apr 23, 2021
2 parents 9486b5b + 60ae228 commit 3b98994
Showing 1 changed file with 5 additions and 3 deletions.
Expand Up @@ -1318,9 +1318,11 @@ private boolean step_040_auto_checkForDuplicates(){

// Has the content type of the file changed?
//
if (!finalFileList.get(0).getContentType().equalsIgnoreCase(fileToReplace.getContentType())){

List<String> errParams = Arrays.asList(fileToReplace.getFriendlyType(),
String fileType = fileToReplace.getOriginalFileFormat() != null ? fileToReplace.getOriginalFileFormat() : fileToReplace.getContentType();
if (!finalFileList.get(0).getContentType().equalsIgnoreCase(fileType)) {
String friendlyType = fileToReplace.getOriginalFormatLabel() != null ? fileToReplace.getOriginalFormatLabel() : fileToReplace.getFriendlyType();

List<String> errParams = Arrays.asList(friendlyType,
finalFileList.get(0).getFriendlyType());

String contentTypeErr = BundleUtil.getStringFromBundle("file.addreplace.error.replace.new_file_has_different_content_type",
Expand Down

0 comments on commit 3b98994

Please sign in to comment.