11-30-2011 06:37 PM
Hi,
I need to store many XML file as document on nuxeo, but when i import these file using drag n drop, the nuxeo convert this as a Note.
Anyone have a solution for this?
12-01-2011 02:49 AM
To make sure that your plugin overrides the original extension you have to provide the
Here is a working example of such an override.
org.nuxeo.ecm.platform.filemanager.service.FileManagerService.Plugins text/plain text/html text/x-web-markdown
Save it in a file
A note on the Content-Type
It is also worth to note that your xml files have to be valid xml with a correct xml version declaration ( ) so that they can be recognized as being of the correct MIME type: text/xml. Otherwise they could be recognized as text/plain, in spite of the file name extension, and then again processed as notes in spite of your valid override definition.
12-01-2011 02:15 AM
What happens when a file is uploaded (creating a Note, a Picture, a File or a custom type) is configured through the FileManager component, based on the mime type of the uploaded file. See http://explorer.nuxeo.org/nuxeo/site/distribution/current/viewContribution/org.nuxeo.ecm.platform.fi...
in 5.4.2 (I believe this has been changed in 5.5) the default behavior for xml mile-type file is indeed to create Note, because of the following native contribution:
<extension point="plugins" target="org.nuxeo.ecm.platform.filemanager.service.FileManagerService">
<plugin class="org.nuxeo.ecm.platform.filemanager.service.extension.NoteImporter" name="NoteImporter" order="10">
<filter>text/plain</filter>
<filter>text/html</filter>
<filter>application/xhtml+xml</filter>
<filter>application/xml</filter>
<filter>text/xml</filter>
</plugin></extension>
You can override this contribution with the same name (NoteImporter) and withdraw text/xml.
12-01-2011 02:49 AM
To make sure that your plugin overrides the original extension you have to provide the
Here is a working example of such an override.
org.nuxeo.ecm.platform.filemanager.service.FileManagerService.Plugins text/plain text/html text/x-web-markdown
Save it in a file
A note on the Content-Type
It is also worth to note that your xml files have to be valid xml with a correct xml version declaration ( ) so that they can be recognized as being of the correct MIME type: text/xml. Otherwise they could be recognized as text/plain, in spite of the file name extension, and then again processed as notes in spite of your valid override definition.
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.