diff --git a/app/models/product_import/product_importer.rb b/app/models/product_import/product_importer.rb index 3fc9b5c07c..80a9744493 100644 --- a/app/models/product_import/product_importer.rb +++ b/app/models/product_import/product_importer.rb @@ -214,7 +214,9 @@ module ProductImport end def accepted_mimetype - File.extname(@file.path).in?('.csv', '.xls', '.xlsx', '.ods') ? @file.path.split('.').last.to_sym : false + return false unless ['.csv'].include? File.extname(@file.path) + + @file.path.split('.').last.to_sym end def headers