[POST] Add File

Description: Upload a file to the server

REST Method: POST

URL: /files.json

Request

Name Type Required Default Options Notes
developer_api_key String Yes Developer api key
files[] File Yes File being uploaded

Using curl

curl -X POST -F "files[]=@/home/tjiu.suryanto/gambar.jpg" 'https://api.bornevia.com/files.json?developer_api_key=[YOUR_DEVELOPER_API_KEY]'

Response

Response Name Type Notes
Header Status Int 200 - Success
400 - File is null or empty
400 - File size is more than 10MB
Body file File File object
{
  "id": "2093-mxzh70.jpg",
  "name": "gambar.jpg",
  "size": 1093047,
  "type": "image/jpeg"
}
Last updated on 3rd Mar 2016