Sha256: 7e17a069348212965e0f4929cd58b146c564d204e42dc5e212de10cb27a82cc2
Contents?: true
Size: 557 Bytes
Versions: 33
Compression:
Stored size: 557 Bytes
Contents
# frozen_string_literal: true module ActiveStorage::Blob::Servable # :nodoc: def content_type_for_serving forcibly_serve_as_binary? ? ActiveStorage.binary_content_type : content_type end def forced_disposition_for_serving if forcibly_serve_as_binary? || !allowed_inline? :attachment end end private def forcibly_serve_as_binary? ActiveStorage.content_types_to_serve_as_binary.include?(content_type) end def allowed_inline? ActiveStorage.content_types_allowed_inline.include?(content_type) end end
Version data entries
33 entries across 33 versions & 5 rubygems