method

headers_for_direct_upload

Importance_0
v7.1.3.4 - Show latest stable - 0 notes - Class: GCSService
headers_for_direct_upload(key, checksum:, filename: nil, disposition: nil, custom_metadata: {}, **) public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activestorage/lib/active_storage/service/gcs_service.rb, line 128
    def headers_for_direct_upload(key, checksum,, filename: nil, disposition: nil, custom_metadata: {}, **)
      content_disposition = content_disposition_with(type: disposition, filename: filename) if filename

      headers = { "Content-MD5" => checksum, "Content-Disposition" => content_disposition, **custom_metadata_headers(custom_metadata) }
      if @config[:cache_control].present?
        headers["Cache-Control"] = @config[:cache_control]
      end

      headers
    end
Register or log in to add new notes.