Sha256: ab428691b776245540ada2dd81bf804a62fff1303e7cda6d8fd21971f48f2809
Contents?: true
Size: 464 Bytes
Versions: 37
Compression:
Stored size: 464 Bytes
Contents
# frozen_string_literal: true module ActiveStorage::SetHeaders #:nodoc: extend ActiveSupport::Concern private def set_content_headers_from(blob) response.headers["Content-Type"] = blob.content_type_for_serving response.headers["Content-Disposition"] = ActionDispatch::Http::ContentDisposition.format \ disposition: blob.forced_disposition_for_serving || params[:disposition] || "inline", filename: blob.filename.sanitized end end
Version data entries
37 entries across 37 versions & 4 rubygems