Hello,
How can I get that reference?
The goal is to keep a unique string that will be used after to get the document and convert it to a base64 stream.
I tried this but I got an error: unable to get content as inputstream.
However, both the length and the mimetype of the document are, as it seems, retrieved with success.
// Use the content service to figure out the URL
Content readResult[] = contentService.read(new Predicate(new Reference[] {
new Reference(storeRef, doc_uudi, null)
}, storeRef, null), Constants.PROP_CONTENT);
content = readResult[0];
logger.debug("length: " + content.getLength());
logger.debug("Mimetype: " + content.getFormat().getMimetype());
InputStream in = ContentUtils.getContentAsInputStream(content);