Skip to content

Commit

Permalink
Fix csv upload (mastodon#13835)
Browse files Browse the repository at this point in the history
  • Loading branch information
noellabo authored and Mage committed Jan 14, 2022
1 parent 890eaa8 commit 9439277
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/import.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#

class Import < ApplicationRecord
FILE_TYPES = %w(text/plain text/csv).freeze
FILE_TYPES = %w(text/plain text/csv application/csv).freeze
MODES = %i(merge overwrite).freeze

self.inheritance_column = false
Expand Down
2 changes: 2 additions & 0 deletions config/initializers/paperclip.rb
Original file line number Diff line number Diff line change
Expand Up @@ -117,3 +117,5 @@
url: ENV.fetch('PAPERCLIP_ROOT_URL', '/system') + '/:prefix_url:class/:attachment/:id_partition/:style/:filename',
)
end

Paperclip.options[:content_type_mappings] = { csv: Import::FILE_TYPES }

0 comments on commit 9439277

Please sign in to comment.