Skip to content

Commit

Permalink
Enable import of zip attachments by mail
Browse files Browse the repository at this point in the history
  • Loading branch information
kidhab committed May 17, 2023
1 parent 2a415a3 commit b10f906
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/tasks/mail.rake
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class ReplyEmailSmtpServer < MidiSmtpServer::Smtpd
filename = nil
message.attachments.each do |part|
# @todo perhaps get heuristic from article import filters?
if part.filename.match(/\.(xls|xlsx|ods|sxc|csv|tsv|xml)$/i)
if part.filename.match(/\.(csv|ods|sxc|tsv|xls|xlsx|tsv|xml|zip)$/i)
FileUtils.mkdir_p(@supplier.mail_path)
filename = "#{message.date.strftime '%Y%m%d'}_#{part.filename.gsub(/[^-a-z0-9_\.]+/i, '_')}"
filename = @supplier.mail_path.join(filename)
Expand Down

1 comment on commit b10f906

@wvengen
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, great
not ethat tsv is present twice now :)

Please sign in to comment.