Skip to content

Commit

Permalink
Merge branch 'develop' into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
mohemohe committed Dec 26, 2023
2 parents c586591 + 8aace1f commit 2569c37
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/models/media_attachment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,9 @@ def file_processors(instance)
def set_unknown_type
if file.blank? && !type_changed?
if ENV['DISABLE_REMOTE_MEDIA_CACHE'] == 'true'
mime = MimeMagic.by_path(File.basename(remote_url)).type
mime = MimeMagic.by_path(File.basename(remote_url))
return self.type = :unknown if mime.nil?

self.type = begin
if VIDEO_MIME_TYPES.include?(mime)
:video
Expand Down

0 comments on commit 2569c37

Please sign in to comment.