{"_id":"56c418f94040602b0064cea1","__v":4,"parentDoc":null,"version":{"_id":"56bc8e689afb8b0d00d62dd2","project":"56bc8e679afb8b0d00d62dcf","__v":18,"createdAt":"2016-02-11T13:36:40.146Z","releaseDate":"2016-02-11T13:36:40.146Z","categories":["56bc8e689afb8b0d00d62dd3","56c3c837bc41330d009f25ed","56c3c83e521f350d00d348eb","56c3c8452d97560d00e23cd8","56c3c85234df460d00c2beb8","56c4180d70187b17005f43b4","56c418162d97560d00e23cf6","56c4181cc4796b0d007ef039","56c4182370187b17005f43b5","56c418292e75e01700986052","56c4183328bd680d005e7ac6","56c4183bbb64720d00552b88","56c418414040602b0064cea0","56c4184754b6030d00ec29a1","56c4184c28bd680d005e7ac7","56c4185370187b17005f43b6","56c4185b6063071700500cfc","582a98b6f8c0a0190053d7a5"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"category":{"_id":"56c4180d70187b17005f43b4","__v":5,"project":"56bc8e679afb8b0d00d62dcf","version":"56bc8e689afb8b0d00d62dd2","pages":["56c418c854b6030d00ec29a2","56c418e670187b17005f43b7","56c418efc4796b0d007ef03a","56c418f94040602b0064cea1","56ca81146b58fb0b00c6d2fc"],"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-02-17T06:49:49.187Z","from_sync":false,"order":1,"slug":"buddy-basics","title":"Buddy Basics"},"project":"56bc8e679afb8b0d00d62dcf","user":"56b98db7bb36440d0001f492","updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-02-17T06:53:45.945Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":3,"body":"#### This topic applies to REST/HTTP calls only. The Buddy SDKs handle file uploads automatically.\n\nFor raw HTTP, files should be uploaded as **multipart/form-data**, which you can read about [here](https://tools.ietf.org/html/rfc2388).   \n\nBefore building this yourself, consider using our SDKs, or a framework such as JQuery to help format the uploads.\n\nThe content should contain two entities: \n\n1.  An entity of `Content-Type:application/json` of the name `body`, which should include all the non-file data fields as JSON data.\n2.  An entity containing the binary to be uploaded of the name described in the parameter documentation such as `data`, decorated with the content type of the file to be uploaded. \n\nSo in the case of a picture upload example:\n\n    --[boundary marker]\n    content-disposition: form-data; name=\"body\"\n    Content-Type:application/json\n    {\n       \"location\":\"47,-122\",\n       \"caption\": \"great photo!\"\n    }\n\n     --[boundary marker]\n     content-disposition: form-data; name=\"userfile\"; filename=\"$filename\"\n     Content-Type: image/png\n     Content-Transfer-Encoding: binary\n     [binary data]\n     --[boundary marker]","excerpt":"","slug":"http-file-uploads","type":"basic","title":"HTTP File Uploads"}
#### This topic applies to REST/HTTP calls only. The Buddy SDKs handle file uploads automatically. For raw HTTP, files should be uploaded as **multipart/form-data**, which you can read about [here](https://tools.ietf.org/html/rfc2388). Before building this yourself, consider using our SDKs, or a framework such as JQuery to help format the uploads. The content should contain two entities: 1. An entity of `Content-Type:application/json` of the name `body`, which should include all the non-file data fields as JSON data. 2. An entity containing the binary to be uploaded of the name described in the parameter documentation such as `data`, decorated with the content type of the file to be uploaded. So in the case of a picture upload example: --[boundary marker] content-disposition: form-data; name="body" Content-Type:application/json { "location":"47,-122", "caption": "great photo!" } --[boundary marker] content-disposition: form-data; name="userfile"; filename="$filename" Content-Type: image/png Content-Transfer-Encoding: binary [binary data] --[boundary marker]