How do I tell where a blob is stored from the document metadata when using the BlobDispatch configuration?

Assuming I have three blob repositories configured (invoices, articles, default) for my instance. Is there a way to tell from the document metadata exactly where the blob is stored?

Example configuration:

<extension target="org.nuxeo.ecm.core.blob.DocumentBlobManager" point="configuration">
  <blobdispatcher>
    <class>org.nuxeo.ecm.core.blob.DefaultBlobDispatcher</class>
    <property name="dc:nature=invoice">invoices</property>
    <property name="dc:nature=article">articles</property>
    <property name="default">default</property>
</extension>

Example file:content:

"file:content": { 
 "name": "sample.png",
 "mime-type": "image/png",
 "encoding": null,
 "digestAlgorithm": "MD5",
 "digest": "0caa26f95908fab00bdbdbdcde751cbf",
 "length": "618915",
 "data": "http://localhost:8117/nuxeo/nxfile/default/f51a0ed5-c87c-408e-a945-43dffd0bd457/file:content/sample.png" 
}

Is the 'default' part of /nuxeo/nxfile/default/ the name of the repository?

0 votes

0 answers

1729 views

ANSWER

The portion of the path default should be the repository id. OTOH you shouldn't need to parse it from a string…
08/09/2018