cancel
Showing results for 
Search instead for 
Did you mean: 

how to have Nuxeo use a file importer plugin?

patco_
Champ in-the-making
Champ in-the-making

Hi,

I have the distribution "nuxeo-cap-5.6-tomcat" installed. I'm on Nuxeo eclipse EDI. I set up an extra workspace for Nuxeo, to avoid any problem when saving preferences.

I created a new project using the wizard Nuxeo plugin project. In this project, I added from the filesystem the directory OSGI-INF beside META-INF, with the content:

<component name="fr.evolutis.uncompress.listener.contrib.CompressedFileImporterPlugin">
<plugin name="CompressedArchivePlugin"  class="fr.evolutis.nuxeo.CompressedFileImporter"  order="1">
<filter>application/zip</filter>
</plugin>
<component name="fr.evolutis.uncompress.listener.contrib.CompressedFileImporterPlugin">
<plugin name="CompressedArchivePlugin"  class="fr.evolutis.nuxeo.CompressedFileImporter"  order="1">
<filter>application/zip</filter>
</plugin>

I followed the example given by Laurent Doguin, with the class name above, but keeping only the "create tree container" part, and return line. I added a line with log.error("hello...") at the entrance of the create method.

I reloaded the plugin. The EDI shows "Deploy done for bundle with name 'CompressedFileImportPlugin'", without any error.

But when I try to import a zip file, I get no error message, and the behaviour is not changed.

I tried to put the order as small as possible, changing it from 10 to 1, but without any success.

What could I have missed?

Tx

Patrick

2 REPLIES 2

Laurent_Doguin
Star Collaborator
Star Collaborator

If you're testing using drag n drop in the browser, be careful of the mime type it sends to Nuxeo. Some browsers sometimes send something different than application/zip for zip file.

patco_
Champ in-the-making
Champ in-the-making

Thank you for the warning.

I made the plugin work by changing the name of the xml file to file-importer-contrib.xml, and by adding the reference in the MANIFEST.MF file.

What mimetype should we add in the section to actually handle files for which there is NO specific mimetype?

Getting started

Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.