Addons

HOWTO: Enable CSV Import on a Custom Document Type

Updated: December 4, 2024

Watch the related courses on Hyland University

If you installed the Nuxeo CSV add-on from the Nuxeo Marketplace, you'll probably want to enable CSV import on the document types you defined, either in Studio or with some code. Here is how to do that.

  1. In Studio, on the left side, under Configuration, in the Advanced Settings menu, click on XML Extensions.
  2. Click on New to create a new extension.
  3. Give it an ID and click on Next.

    You may want to check the Studio naming conventions.

  4. Paste the following content in the text area and fill in the <type> tag with the ID of the document type on which you want to enable CSV import.

    <require>org.nuxeo.ecm.platform.actions.ActionService</require>
    <extension target="org.nuxeo.ecm.platform.actions.ActionService"
      point="filters">
      <filter id="importFile" append="true">
        <rule grant="true">
          <permission>AddChildren</permission>
          <type>YourCustomTypeID</type>
        </rule>
      </filter>
    </extension>
    
  5. In the XML extension, put as many <type> tags as documents types on which CSV import should be enabled.

  6. Click on Save. After you update your Nuxeo Platform instance, your document type(s) will have the Import a CSV file button.

If you don't want to use Studio and prefer using your IDE, you can just add a contribution with the XML above.