August 2018
Intermediate to advanced
260 pages
5h 48m
English
class AttachmentsService BASE_URI = "http://attachment-service.yourorg.example.com/" def upload(message_id, user_id, file_name, data, media_type) body = { user_id: user_id, file_name: file_name, data: StringIO.new(Base64.decode64(params[:file] [:data]), 'rb'), message: message_id, media_type: media_type }.to_json uri = URI("#{BASE_URI}attachment") headers = { "Content-Type" => ...Read now
Unlock full access