MediaType partContentType = MediaType.valueOf(content.getContentType());
ContentItem contentItem = null;
ContentItemFactory ciFactory = getContentItemFactory();
if(MULTIPART.isCompatible(partContentType)){
//multiple contentParts are parsed
FileItemIterator contentPartIterator = fu.getItemIterator(
new MessageBodyReaderContext(
content.openStream(), partContentType));
while(contentPartIterator.hasNext()){
FileItemStream fis = contentPartIterator.next();
if(contentItem == null){
log.debug("create ContentItem {} for content (type:{})",
id,content.getContentType());
contentItem = ciFactory.createContentItem(id,
new StreamSource(fis.openStream(),fis.getContentType()),