Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/models/csv_import.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class CsvImport

has_attached_file :csv
validates_attachment :csv, :presence => {:message => "Oops! Please select a CSV file to import."},
:content_type => { :content_type => ['text/csv','text/comma-separated-values','application/csv','application/octet-stream'], :message => "Oops! Please upload a file with the extension of csv." },
:content_type => { :content_type => ['text/csv','text/comma-separated-values','application/csv','application/octet-stream','application/excel','application/vnd.ms-excel', 'application/vnd.msexcel', 'text/anytext'], :message => "Oops! Please upload a file with the extension of csv." },
:size => { :greater_than => 0.kilobytes, :message => 'Oops! This file has no data. Please upload a file with some data.' }

def initialize(attributes={})
Expand Down