From eba96fecfa91f68007fb33c4158f76dd50489a6c Mon Sep 17 00:00:00 2001 From: Alan Davis Date: Tue, 11 Feb 2014 20:45:54 +0000 Subject: [PATCH] Merged HEAD-BUG-FIX (4.3/Cloud) to HEAD (4.3/Cloud) 57479: Merged V4.2-BUG-FIX (4.2.1) to HEAD-BUG-FIX (Cloud/4.3) 57289: Merged V4.1-BUG-FIX (4.1.7) to V4.2-BUG-FIX (4.2.1) 57269: MNT-9255: Metadata of a document should be extracted before a new version is created - Moved extraction of metadata before checkin of node git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@61821 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../org/alfresco/repository/upload/upload.post.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/config/alfresco/templates/webscripts/org/alfresco/repository/upload/upload.post.js b/config/alfresco/templates/webscripts/org/alfresco/repository/upload/upload.post.js index 65adff8d0a..fb7979fd64 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/repository/upload/upload.post.js +++ b/config/alfresco/templates/webscripts/org/alfresco/repository/upload/upload.post.js @@ -241,6 +241,12 @@ function main() updateNode.properties.content.guessMimetype(filename); updateNode.properties.content.guessEncoding(); // check it in again, with supplied version history note + + // 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) { @@ -253,11 +259,6 @@ function main() } } - // Extract the metadata - // (The overwrite policy controls which if any parts of - // the document's properties are updated from this) - extractMetadata(updateNode); - // Record the file details ready for generating the response model.document = updateNode; }