Skip to content

Commit

Permalink
Fix: allow MIME types of HEIF families
Browse files Browse the repository at this point in the history
  • Loading branch information
takahashim committed Oct 16, 2022
1 parent c1ce6e8 commit 23710c4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/previewers/heic_previewer.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# frozen_string_literal: true

class HeicPreviewer < ActiveStorage::Previewer
CONTENT_TYPE = "image/heic"
CONTENT_TYPES = %w(image/heic image/heif image/heic-sequence image/heif-sequence).freeze

class << self
def accept?(blob)
blob.content_type == CONTENT_TYPE && minimagick_exists?
CONTENT_TYPES.include?(blob.content_type) && minimagick_exists?
end

def minimagick_exists?
Expand Down

0 comments on commit 23710c4

Please sign in to comment.