instance method update_metadata_for

Ruby on Rails edge

Since edge Private — implementation detail, not part of the public API

Signature

update_metadata_for(key, content_type:, disposition: nil, filename: nil, custom_metadata: {})

No documentation comment.

Parameters

key req
content_type keyreq
disposition key = nil
filename key = nil
custom_metadata key = {}
Source
# File activestorage/lib/active_storage/service/gcs_service.rb, line 186
      def update_metadata_for(key, content_type:, disposition: nil, filename: nil, custom_metadata: {})
        file_for(key).update do |file|
          file.content_type = content_type
          file.content_disposition = content_disposition_with(type: disposition, filename: filename) if disposition && filename
          file.metadata = custom_metadata
        end
      end

Defined in activestorage/lib/active_storage/service/gcs_service.rb line 186 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveStorage::Service::GCSService

Type at least 2 characters to search.

Use the arrow keys to navigate results, Enter to open one, Escape to close.

Keyboard shortcuts

/
Focus search
⌘K / Ctrl-K
Command palette
?
This help
Esc
Close