From 3dc00da2a57ce16a9918c55e5071493e76b24f36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20=C5=BBurek?= Date: Mon, 14 Mar 2022 14:37:47 +0100 Subject: [PATCH] ACS-2658 Fix missing metadata extraction while uploading new version (#1016) --- .../webscripts/org/alfresco/repository/upload/upload.post.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/remote-api/src/main/resources/alfresco/templates/webscripts/org/alfresco/repository/upload/upload.post.js b/remote-api/src/main/resources/alfresco/templates/webscripts/org/alfresco/repository/upload/upload.post.js index 31d1b112a2..896e8dcc03 100644 --- a/remote-api/src/main/resources/alfresco/templates/webscripts/org/alfresco/repository/upload/upload.post.js +++ b/remote-api/src/main/resources/alfresco/templates/webscripts/org/alfresco/repository/upload/upload.post.js @@ -357,12 +357,13 @@ function main() updateNode.properties.content.write(content, updateNameAndMimetype, true, newFilename); // check it in again, with supplied version history note + updateNode = updateNode.checkin(description, majorVersion); + // Extract the metadata // (The overwrite policy controls which if any parts of // the document's properties are updated from this) extractMetadata(updateNode); - - updateNode = updateNode.checkin(description, majorVersion); + if (aspects.length != 0) { for (i = 0; i < aspects.length; i++)