Method: Podio::FileAttachment.create

Defined in:
lib/podio/models/file_attachment.rb

.create(name, content_type) ⇒ Object

Uploading a file is a two-step operation First, the file must be created to get a file id and the path to move it to



111
112
113
114
115
116
117
118
# File 'lib/podio/models/file_attachment.rb', line 111

def create(name, content_type)
  response = Podio.connection.post do |req|
    req.url "/file/"
    req.body = { :name => name, :mimetype => content_type }
  end

  response.body
end