Nuxeo Server

How to Change the Default Document Type When Importing a File in the Nuxeo Platform?

Updated: October 13, 2017 Page Information Edit on GitHub

In this how-to, importing a file can correspond to using the drag and drop, using the Import button, or adding a file from Nuxeo Drive or a WebDAV drive.

The mechanism to create a Nuxeo document with an import is tight to the plugins extension point from the FileManager service.

According to the MIME type of the file you try to import, a specific plugin will be called. And most of the time, it's the DefaultFileImporter plugin that will be used.

So, to create a document of your own type, you have to set the docType attribute when overwriting the default contribution:

<require>org.nuxeo.ecm.platform.filemanager.service.FileManagerService.Plugins</require>

<extension target="org.nuxeo.ecm.platform.filemanager.service.FileManagerService" point="plugins">
    <plugin name="DefaultFileImporter" merge="true" docType="MyCustomFileType" />
</extension>

5 days ago manonlumeau NXDOC-1346-FT review screenshot
a year ago Manon Lumeau 15
a year ago Solen Guitter 14
2 years ago Solen Guitter 13 | link update
2 years ago Antoine Taillefer 12
2 years ago Antoine Taillefer 11
2 years ago Antoine Taillefer 10
3 years ago Manon Lumeau 9
3 years ago Solen Guitter 8 | add links
3 years ago Solen Guitter 7
3 years ago Solen Guitter 6
4 years ago Solen Guitter 5
4 years ago Solen Guitter 4
4 years ago Thierry Martins 2 | Add related links
4 years ago Thierry Martins 3
4 years ago Thierry Martins 1
History: Created by Thierry Martins