class Dato::Site::Client
Public Instance Methods
create_upload_path(path_or_url)
click to toggle source
# File lib/dato/site/client.rb, line 14 def create_upload_path(path_or_url) file = Upload::CreateUploadPath.new(self, path_or_url) file.upload_path end
pusher_token(socket_id, channel)
click to toggle source
# File lib/dato/site/client.rb, line 29 def pusher_token(socket_id, channel) request( :post, "/pusher/authenticate", { socket_id: socket_id, channel_name: channel }, ) end
upload_file(path_or_url, upload_attributes = {}, field_attributes = {})
click to toggle source
# File lib/dato/site/client.rb, line 19 def upload_file(path_or_url, upload_attributes = {}, field_attributes = {}) file = Upload::File.new(self, path_or_url, upload_attributes, field_attributes) file.upload end
upload_image(path_or_url, upload_attributes = {}, field_attributes = {})
click to toggle source
# File lib/dato/site/client.rb, line 24 def upload_image(path_or_url, upload_attributes = {}, field_attributes = {}) file = Upload::File.new(self, path_or_url, upload_attributes, field_attributes) file.upload end