Skip to content

[PR Available] Errors when trying to import from csv file with application/csv MIME type #18

@jzisser9

Description

@jzisser9

Note: I've opened a PR to fix this issue: #17

I recently upgraded to MacOS Big Sur (11.x) and noticed that SIP no longer works. I'd get errors saying that the Data file's contents are not what they appear to be, along with a couple of validation errors. I discovered that, beginning with MacOS Big Sur, the file system associates .csv files with the MIME type application/csv, rather than text/plain, and it seems like SIP doesn't support this MIME type.

After some investigation, I was able to find the source of these errors:

  • "Data file contents are not what they appear to be": Paperclip raises this error if the file you're importing from does not have an associated MIME type.
  • "Data file type is invalid": The product_import.rb model has a validation with a whitelist of mime types. application/csv is not in the whitelist.

The PR linked above, #17 , fixes both of these issues.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions