mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
ALF-6297 - Adobe Framemaker "save" function does not play well with alfresco cifs
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@29687 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -3185,6 +3185,28 @@ public class ContentDiskDriver2 extends AlfrescoDiskDriver implements ExtendedD
|
||||
Serializable prop = nodeService.getProperty(sourceNodeRef, ContentModel.PROP_CONTENT);
|
||||
if(prop != null)
|
||||
{
|
||||
if(prop instanceof ContentData)
|
||||
{
|
||||
ContentData data = (ContentData)prop;
|
||||
if(data.getMimetype().equalsIgnoreCase(MimetypeMap.MIMETYPE_BINARY))
|
||||
{
|
||||
if(logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug("mimetype is binary - guess mimetype has failed");
|
||||
}
|
||||
Serializable targetProp = nodeService.getProperty(targetNodeRef, ContentModel.PROP_CONTENT);
|
||||
|
||||
if(targetProp != null && targetProp instanceof ContentData)
|
||||
{
|
||||
ContentData targetData = (ContentData)targetProp;
|
||||
logger.debug("copy the existing mimetype");
|
||||
prop = ContentData.setMimetype(data, targetData.getMimetype());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
nodeService.setProperty(targetNodeRef, ContentModel.PROP_CONTENT, prop);
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user