Method: ActiveStorage::Service::GCSService#update_metadata

Defined in:
activestorage/lib/active_storage/service/gcs_service.rb

#update_metadata(key, content_type:, disposition: nil, filename: nil, custom_metadata: {}) ⇒ Object



48
49
50
51
52
53
54
55
56
# File 'activestorage/lib/active_storage/service/gcs_service.rb', line 48

def (key, content_type:, disposition: nil, filename: nil, custom_metadata: {})
  instrument :update_metadata, key: key, content_type: content_type, disposition: disposition do
    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. = 
    end
  end
end