Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-24394

CSV Importer doesn't admit white spaces between the ',' and the next '"'

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 9.10-HF01
    • Fix Version/s: 11.1, 2021.0
    • Component/s: CSV Importer

      Description

      Steps to reproduce:

      • Install Nuxeo CSV Importer
        $NUXEO_HOME/bin/nuxeoctl mp-install nuxeo-csv-1.6.3
        
      • Config your import path in nuxeo.conf
        nuxeo.csv.blobs.folder=/tmp/nuxeo-csv-import
        
      • Create a Custom type, e.g. PRDTPicutre
      • add a XML extension
        - Upload 
        <require>org.nuxeo.ecm.platform.actions</require>
        <extension target="org.nuxeo.ecm.platform.actions.ActionService"
          point="filters">
          <filter id="importFile" append="true">
            <rule grant="true">
              <permission>AddChildren</permission>
              <type>PRDTPicture</type>
            </rule>
          </filter>
        </extension>
        
      • Upload some files to your import folder
      • Reload your config
      • Try to import this csv file:
        "name","type","dc:title","file:content"
        "317180_-_images_-_products_-_13227079_-_templ1.jpg", "PRDTPicture", "317180_-_images_-_products_-_13227079_-_templ1.jpg", "CanadianPeak/317180_-_images_-_products_-_13227079_-_templ1.jpg"
        "317180_-_images_-_products_-_13227079_-_templ2.jpg", "PRDTPicture", "317180_-_images_-_products_-_13227079_-_templ2.jpg", "CanadianPeak/317180_-_images_-_products_-_13227079_-_templ2.jpg"
        

      If your CSV file contains white spaces between , and " this error message is shown in the browser:

      The type "PRDTPicture" does not exist

      The same file without white spaces works ok:

      "name","type","dc:title","file:content"
      "317180_-_images_-_products_-_13227079_-_templ1.jpg","PRDTPicture","317180_-_images_-_products_-_13227079_-_templ1.jpg","CanadianPeak/317180_-_images_-_products_-_13227079_-_templ1.jpg"
      "317180_-_images_-_products_-_13227079_-_templ2.jpg","PRDTPicture","317180_-_images_-_products_-_13227079_-_templ2.jpg","CanadianPeak/317180_-_images_-_products_-_13227079_-_templ2.jpg"
      

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 days
                3d