API Method: POST room's upload

Uploads a file to the room.

Path:

/api/v2/rooms/#{room_id}/uploads.#{format}

Formats:

xml, json

HTTP Method(s):

POST

Parameters:

Note that all parameters are encapsulated within an upload array (see example)

  • file Required. File parameter in the multipart post body should be called upload[file].

Usage examples:

$ curl -u api_token:x -F "upload[file]=@filename.pdf" https://bigbang.jaconda.im/api/v2/rooms/developers/uploads.xml

Response:

XML example:

<?xml version="1.0" encoding="UTF-8"?>
<upload>
  <created-at type="datetime">2011-02-26T13:16:49+05:00</created-at>
  <file-content-type>application/octet-stream</file-content-type>
  <id type="integer">771</id>
  <updated-at type="datetime">2011-02-26T13:16:49+05:00</updated-at>
  <user-id type="integer">18265</user-id>
  <file-size type="integer">305822</file-size>
  <file-url>https://s3.amazonaws.com/jacondaim/uploads/000/000/771/89detu624954181aba36b61efe2b8a73/filename.pdf</file-url>
</upload>