mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Fixed problem where the MS Word renames during document save lose the original mime-type.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2128 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -507,12 +507,13 @@ public class CifsHelper
|
||||
String mimetype = mimetypeService.guessMimetype(tempName);
|
||||
oldContentData = ContentData.setMimetype(null, mimetype);
|
||||
}
|
||||
|
||||
ContentData newContentData = fileToMoveInfo.getContentData();
|
||||
if (newContentData == null)
|
||||
{
|
||||
String mimetype = mimetypeService.guessMimetype(newName);
|
||||
newContentData = ContentData.setMimetype(null, mimetype);
|
||||
}
|
||||
|
||||
// Reset the mime type
|
||||
|
||||
String mimetype = mimetypeService.guessMimetype(newName);
|
||||
newContentData = ContentData.setMimetype(newContentData, mimetype);
|
||||
|
||||
nodeService.setProperty(tempNodeRef, ContentModel.PROP_CONTENT, newContentData);
|
||||
nodeService.setProperty(nodeToMoveRef, ContentModel.PROP_CONTENT, oldContentData);
|
||||
|
Reference in New Issue
Block a user