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 63cda845cc..c616f98050 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 @@ -135,6 +135,9 @@ function main() } // Update the working copy workingCopy.properties.content.write(content); + // Reset working copy mimetype and encoding + workingCopy.properties.content.guessMimetype(filename); + workingCopy.properties.content.encoding = "UTF-8"; // check it in again, but with a version history note and as minor or major version increment workingCopy = workingCopy.checkin(description, majorVersion); model.document = workingCopy;