• Resolved arifmd

    (@arifmd)


    Hi,

    I have been trying to import reviews from PROD site to UAT, and have followed the template shared within the plugin but getting below error after clicking on upload button.

    The uploaded file is not a valid CSV file

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter arifmd

    (@arifmd)

    Below is the admin-ajax.php response:

    {"success":false,"data":{"message":"The uploaded file is not a valid CSV file","filename":"review-import-template.csv"}}

    [ Please do not bump. ]

    Hi,

    Thank you for using CusRev.

    It looks like your site is enabled the filter for MIME types when uploading files. Please try to use this plugin to solve this issue https://www.ads-software.com/plugins/disable-real-mime-check/

    Refer to this topic https://www.ads-software.com/support/topic/error-when-trying-to-import-csv-file/

    Thread Starter arifmd

    (@arifmd)

    Thanks for the reply @longnguyen89 unfortunately that was not the case.

    It’s due to the invalid formatting in CSV file due to spaces created using LF line-breaks probably while exporting from woo-commerce through the plugin, I was just validating the CSV file through online tool which checks using the CSVLint at https://csvlint.io/

    It helped me to figure out the issue while getting the friendly messages in the bottom as mentioned below:

    Structural problem: Non-standard Line Breaks on row 1
    
    Your CSV appears to use LF line-breaks. While this will be fine in most cases, RFC 4180 specifies that CSV files should use CR-LF (a carriage-return and line-feed pair, e.g. \r\n). This may be labelled as "Windows line endings" on some systems.

    I have fixed the warnings/messages and tried to upload the CSV again which works essentially

    • This reply was modified 3 years, 2 months ago by arifmd.
    • This reply was modified 3 years, 2 months ago by arifmd.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘The uploaded file is not a valid CSV file’ is closed to new replies.