Skip to content
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.

Commit

Permalink
Fix csv upload (mastodon#13835)
Browse files Browse the repository at this point in the history
  • Loading branch information
noellabo authored May 24, 2020
1 parent 51d8964 commit 8e056bd
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 @@ -111,3 +111,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 8e056bd

Please sign in to comment.