File

The system can store files from different types. The "file" content item is the main tool for that.

Method: upload

This method is suitable for working with the JQuery FileUpload plugin.

Authorization is required.

Request

HTTP request

POST https://<YOUR_DOMAIN>/api/v1/en_US/file

Parameters

Do not supply a request parameters with this method.

Request body

This method requires a multipart/form-data for the request body in order to be able to upload large files.

Response

If successful, this method returns a response JSON with the following structure:

{
  "files": [
    {
      "url": "http://www.domain.com/Upload/11111.jpg",
      "thumbnail_url": null,
      "name": "11111.jpg",
      "length": 7890,
      "type": "image/jpg"
    }
  ]
}

The general response properties are described on the Response format page. Here are the list of the specific properties for this method.

The response holds the uploaded file(s) object in the "files" array. The properties are:

property value description
url string The URL of the newly uploaded file
thumbnail_url string it is always null for now as HiveSocial does not generate thumbnails yet.
name string the uploaded file's name
length integer The file size in KB
type string The file's MIME type