Module: VkApiSimple::Photos::UploadImage

Included in:
VkApiSimple::Photos
Defined in:
lib/vk_api_simple/photos/upload_image.rb

Overview

Upload image to server

Instance Method Summary collapse

Instance Method Details

#upload_image(args = {}) ⇒ Object



5
6
7
8
# File 'lib/vk_api_simple/photos/upload_image.rb', line 5

def upload_image(args = {})
  response = RestClient.post(args[:url], file1: File.open(args[:filename]))
  JSON.parse(response.body)
end