Author: sascharodekamp Date: Thu Jun 9 14:30:13 2011 New Revision: 1133890
URL: http://svn.apache.org/viewvc?rev=1133890&view=rev Log: Fix - Fix an issue with the Tika mime type detection. The detection was not correct. Modified: ofbiz/branches/jackrabbit20100709/applications/content/src/org/ofbiz/content/jcr/orm/OfbizRepositoryMappingJackrabbit.java ofbiz/branches/jackrabbit20100709/applications/content/src/org/ofbiz/content/test/JcrTests.java Modified: ofbiz/branches/jackrabbit20100709/applications/content/src/org/ofbiz/content/jcr/orm/OfbizRepositoryMappingJackrabbit.java URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/content/src/org/ofbiz/content/jcr/orm/OfbizRepositoryMappingJackrabbit.java?rev=1133890&r1=1133889&r2=1133890&view=diff ============================================================================== --- ofbiz/branches/jackrabbit20100709/applications/content/src/org/ofbiz/content/jcr/orm/OfbizRepositoryMappingJackrabbit.java (original) +++ ofbiz/branches/jackrabbit20100709/applications/content/src/org/ofbiz/content/jcr/orm/OfbizRepositoryMappingJackrabbit.java Thu Jun 9 14:30:13 2011 @@ -559,13 +559,12 @@ public class OfbizRepositoryMappingJackr resource = folder.getNode("jcr:content"); checkOutNode(resource); } - Binary binary = this.session.getValueFactory().createBinary(file); String mimeType = getMimeTypeFromInputStream(file); - resource.setProperty(PROPERTY_FIELDS.MIMETYPE.getType(), mimeType); // resource.setProperty("jcr:encoding", ""); + Binary binary = this.session.getValueFactory().createBinary(file); resource.setProperty(PROPERTY_FIELDS.DATA.getType(), binary); resource.addMixin(PROPERTY_FIELDS.mixInVERSIONING.getType()); saveSessionAndCheckinNode(); Modified: ofbiz/branches/jackrabbit20100709/applications/content/src/org/ofbiz/content/test/JcrTests.java URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/content/src/org/ofbiz/content/test/JcrTests.java?rev=1133890&r1=1133889&r2=1133890&view=diff ============================================================================== --- ofbiz/branches/jackrabbit20100709/applications/content/src/org/ofbiz/content/test/JcrTests.java (original) +++ ofbiz/branches/jackrabbit20100709/applications/content/src/org/ofbiz/content/test/JcrTests.java Thu Jun 9 14:30:13 2011 @@ -119,7 +119,7 @@ public class JcrTests extends OFBizTestC } public void testUploadFileToRepository() throws Exception { - File f = new File("build.xml"); + File f = new File("stopofbiz.sh"); assertTrue(f.exists()); InputStream file = new FileInputStream(f);

