05-27-2014 01:10 PM
try {
contentStream = session.getObjectFactory().
createContentStream(
sFileName,
file.length(),
sfileType,
new FileInputStream(file)
);
Folder folder = (Folder) session.getObjectByPath(sTargetSpaceName);
//document = folder.createDocument(props, contentStream, null);
document = folder.createDocument(props, contentStream, null);
//System.out.println("Created new document in Alfresco for: " + sFileName + ": " + document.getId());
System.out.println("Created new document in Alfresco for: " + sFileName);
} catch (CmisContentAlreadyExistsException ccaee) {
System.out.println("ERROR: Unable to Load - CmisContentAlreadyExistsException: " + sFileName);
} catch (CmisConstraintException cce) {
System.out.println("ERROR: Unable to Load - CmisConstraintException: " + sFileName);
}
05-27-2014 11:07 PM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.