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);
|
String mimetype = mimetypeService.guessMimetype(tempName);
|
||||||
oldContentData = ContentData.setMimetype(null, mimetype);
|
oldContentData = ContentData.setMimetype(null, mimetype);
|
||||||
}
|
}
|
||||||
|
|
||||||
ContentData newContentData = fileToMoveInfo.getContentData();
|
ContentData newContentData = fileToMoveInfo.getContentData();
|
||||||
if (newContentData == null)
|
|
||||||
{
|
// Reset the mime type
|
||||||
String mimetype = mimetypeService.guessMimetype(newName);
|
|
||||||
newContentData = ContentData.setMimetype(null, mimetype);
|
String mimetype = mimetypeService.guessMimetype(newName);
|
||||||
}
|
newContentData = ContentData.setMimetype(newContentData, mimetype);
|
||||||
|
|
||||||
nodeService.setProperty(tempNodeRef, ContentModel.PROP_CONTENT, newContentData);
|
nodeService.setProperty(tempNodeRef, ContentModel.PROP_CONTENT, newContentData);
|
||||||
nodeService.setProperty(nodeToMoveRef, ContentModel.PROP_CONTENT, oldContentData);
|
nodeService.setProperty(nodeToMoveRef, ContentModel.PROP_CONTENT, oldContentData);
|
||||||
|
Reference in New Issue
Block a user