[
https://jira.nuxeo.org/browse/NXP-4874?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=71319#action_71319
]
Benjamin Jalon commented on NXP-4874:
-------------------------------------
Add a getter for binary on SQLBlob. Needed to get the FS path to build the
StreamURL
Add a getter for StorageDir in DefaultBinaryManager
http://hg.nuxeo.org/nuxeo/nuxeo-core/rev/44b27ce9f456
http://hg.nuxeo.org/nuxeo/nuxeo-core/rev/b642b7c352fd
Now to get the storageDir and the path where a blob is stored :
RepositoryService repositoryService = (RepositoryService)
Framework.getRuntime().getComponent(
RepositoryService.NAME);
RepositoryManager repositoryManager =
repositoryService.getRepositoryManager();
RepositoryDescriptor descriptor =
repositoryManager.getDescriptor(repositoryName);
DefaultBinaryManager binaryManager = new DefaultBinaryManager(
SQLRepository.getDescriptor(descriptor)));
File storageDir = binaryManager.getStorageDir();
SQLBlob blob = (SQLBlob) doc.getPropertyValue("schema:blobField");
File file = binaryManager.getFileForDigest(
blob.getBinary().getDigest(), false);
All these things are needed to create stream url path.
> Integrate Darwin Server with DAM
> --------------------------------
>
> Key: NXP-4874
> URL: https://jira.nuxeo.org/browse/NXP-4874
> Project: Nuxeo Enterprise Platform
> Issue Type: Task
> Affects Versions: 5.3 GA
> Reporter: Benjamin Jalon
> Assignee: Benjamin Jalon
> Fix For: 5.3.1
>
>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.nuxeo.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
ECM-tickets mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm-tickets