Using Nuxeo for a WCM solution via the RestAPI. So we are rendering Nuxeo Note documents as HTML content areas. Our JBoss/Seam web app is munging the URIs for images and document links embedded in Notes. So these otherwise private/Nuxeo ECM specific URIs will render in our client's browsers (who know nothing about Nuxeo and don't have Nuxeo logins). Our web app has some servlets intercepting those requests and using HttpClient and restlet calls to render non-HTML content inline.
Images are working nicely. Now trying to work this out for other embedded object links in our Note documents, e.g. PDFs or Word docs. Unlike images, there is no "upload a PDF and insert" rich edit control for these other types of images that create an "nxfile" hyperlink, like this: http://localhost:8080/nuxeo/nxfile/default/60a0a97b-6a2d-4a5f-b9a1-b2eef1568ad4/files:files/%5B0%5D/file/my-image.jpg (side note: the current 5.1.4 release has a bug where the URI inserted by the rich edit ends in ".../filename/my-image.jpg" and I have to edit the HTML replacing that with ".../file/my-image.jpg" -- if I recall this is a known bug) So I'm using the "import a file" feature to add the PDF to Nuxeo, and then tried using the "insert a link to a Nuxeo Document" rich edit control. That works, but inserts a link that brings up the "nxdoc" document overview for the PDF, not the PDF itself: http://localhost:8080/nuxeo/nxdoc/default/5dc205f1-02d4-4833-9809-460572ae5648/view_documents?tabId=&conversationId=0NXMAIN1&conversationIsLongRunning=true That makes sense in the Nuxeo ECM web app context, but not in our WCM context. So I work around this by copying and pasting the embedded file's URL from that "nxdoc" view, i.e. http://localhost:8080/nuxeo/nxfile/default/5dc205f1-02d4-4833-9809-460572ae5648/file:content/gen_liability.pdf So I end up overwriting the original "nxdoc"-based URI in my Note with the above URI. That works for my WCM solution, but will be a little unwieldy in the long run when we have less technical end users updating the Nuxeo ECM content. I am seeking input on if there is a better way to achieve this result. I could look into automating this, i.e. adding a rich edit control to create the "nxfile" link in addition to the existing control that creates the "nxdoc" links. Or I could have my WCM integration parse the PDF blob from the RestAPI's XML response to a "restAPI/.../export" request. Would prefer to use the "nxfile" interface. Thanks for any feedback/suggestions. Maybe these ideas will be helpful to others looking to leverage Nuxeo for WCM. - Alex _______________________________________________ ECM mailing list [email protected] http://lists.nuxeo.com/mailman/listinfo/ecm
