{"metadata":{"image":[],"title":"","description":""},"api":{"url":"/files","auth":"required","results":{"codes":[]},"settings":"","examples":{"codes":[]},"method":"post","params":[{"name":"file","type":"file","default":"","desc":"File to upload","required":false,"in":"body","ref":"","_id":"553a9b8f861cb10d00e32934"}]},"next":{"description":"","pages":[]},"title":"Uploading a File","type":"endpoint","slug":"uploading-a-file","excerpt":"","body":"In order to upload a file, make a request to the `files` endpoint using the `HTTP` `POST` Method.  The content type in the request headers should be set to `multipart/form-data`.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Content-Type: multipart/form-data;\",\n      \"language\": \"http\"\n    }\n  ]\n}\n[/block]\nIf the request was successful, the server should respond with the HTTP Status Code: 202 (Accepted).   \n\nAt this point the file is queued for processing.  The response headers will contain a location header that contains a link to an entry in the queue that can be polled for the status of the uploaded file.  \n\nOnce the file has been successfully processed, the queue entry will provide a link to the actual file resource.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Location: \\\"https://api.goformz.com/v2/queue/94a89341-4687-4546-a1bb-f66415337643\\\"\",\n      \"language\": \"http\"\n    }\n  ]\n}\n[/block]\n</br><a href=\"https://api.goformz.com/docs/api/explorer/index#!/Files/Files_Post\" target=\"_blank\"><img src=\"https://files.readme.io/9Z82WIZnS7mZmco8oi4u_TryItNow3.png\" style=\"margin-left:15px\" width=\"128\" height=\"42\" ></a>","updates":[],"order":1,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"553a9b8f861cb10d00e32933","createdAt":"2015-04-24T19:37:51.722Z","githubsync":"","category":{"sync":{"isSync":false,"url":""},"pages":["553a9a0e69c2630d00a8563b","553a9b8f861cb10d00e32933"],"title":"Files","slug":"files","order":6,"from_sync":false,"reference":false,"_id":"553a98332af5f20d000fc32a","version":"553591cd63cc650d00312925","__v":2,"createdAt":"2015-04-24T19:23:31.834Z","project":"55357364e02d480d0003c6d3"},"editedParams2":true,"__v":0,"editedParams":true,"project":"55357364e02d480d0003c6d3","user":"55356ede6040a20d00454508","version":{"version":"2","version_clean":"2.0.0","codename":"","is_stable":true,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["553591cd63cc650d00312926","553591cd63cc650d00312927","5536e4d39f7f2d0d00b1cd54","5536e55c20d5ca0d0001580a","5536e6bf7fe60f0d000fd1c0","5536f5bba171250d00c00556","553a974369c2630d00a8562e","553a97c60074c80d00621c2a","553a98332af5f20d000fc32a","553a9b9869c2630d00a85642","556e0f23d02e0b190042f13d","563249b1dcc27a1700823650","5639113f049e420d00476b03","59a5dd94aaa11d003334edb4"],"_id":"553591cd63cc650d00312925","project":"55357364e02d480d0003c6d3","releaseDate":"2015-04-20T23:54:53.134Z","__v":13,"forked_from":"55357365e02d480d0003c6d6","createdAt":"2015-04-20T23:54:53.134Z"},"parentDoc":null}

postUploading a File


Definition

{{ api_url }}{{ page_api_url }}

Parameters

Body Params

file:
file
File to upload

Documentation

In order to upload a file, make a request to the `files` endpoint using the `HTTP` `POST` Method. The content type in the request headers should be set to `multipart/form-data`. [block:code] { "codes": [ { "code": "Content-Type: multipart/form-data;", "language": "http" } ] } [/block] If the request was successful, the server should respond with the HTTP Status Code: 202 (Accepted). At this point the file is queued for processing. The response headers will contain a location header that contains a link to an entry in the queue that can be polled for the status of the uploaded file. Once the file has been successfully processed, the queue entry will provide a link to the actual file resource. [block:code] { "codes": [ { "code": "Location: \"https://api.goformz.com/v2/queue/94a89341-4687-4546-a1bb-f66415337643\"", "language": "http" } ] } [/block] </br><a href="https://api.goformz.com/docs/api/explorer/index#!/Files/Files_Post" target="_blank"><img src="https://files.readme.io/9Z82WIZnS7mZmco8oi4u_TryItNow3.png" style="margin-left:15px" width="128" height="42" ></a>