Skip to content

Commit

Permalink
Logger for image debug
Browse files Browse the repository at this point in the history
  • Loading branch information
parterburn committed Jan 8, 2024
1 parent dcab19d commit 34fda26
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions app/lib/email_processor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,15 @@ def process
@attachments.each do |attachment|
next unless attachment.present?

# Make sure attachments are at least 20kb so we're not saving a bunch of signuture/footer images\
file_size = File.size?(attachment.tempfile).to_i
if @user.id == 1
# Temp log for debugging
p "*" * 100
p attachment
p "*" * 100
end

# Make sure attachments are at least 20kb so we're not saving a bunch of signature/footer images\
file_size = attachment.size.presence || File.size?(attachment.tempfile).to_i

# skip signature images
next if @user.id == 293 && (attachment&.original_filename.to_s == "cropped-IMG-0719-300x86.jpeg" || attachment&.filename.to_s == "cropped-IMG-0719-300x86.jpeg")
Expand Down

0 comments on commit 34fda26

Please sign in to comment.