how to have Nuxeo use a file importer plugin?

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

0 votes

2 answers

1009 views

ANSWER



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

0 votes



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.

0 votes