From c115bd290adc07cc891c599f0a093d4c072b994d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Geisendo=CC=88rfer?= Date: Sun, 17 Mar 2013 00:42:41 +0100 Subject: [PATCH] more api --- README.md | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 962d78e..6129ae9 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,24 @@ Location: http://tus.example.com/files/123d3ebc995732b2 } ``` +## `PUT /files/` + +**Request:** +``` +PUT /files/123d3ebc995732b2 HTTP/1.1 +Host: tus.example.com +Content-Length: 100 +Content-Range: bytes 0-99/100 +``` +``` +[bytes 0-99] +``` + +**Response:** +``` +HTTP/1.1 200 Ok +``` + ### `GET /files/123d3ebc995732b2` **Request:** @@ -58,17 +76,19 @@ Location: http://tus.example.com/files/123d3ebc995732b2 GET /files/123d3ebc995732b2/d930cc9d304cc667 HTTP/1.1 Host: tus.example.com Content-Length: 0 -Content-Range: bytes */* ``` -The server responds by informing the client about the status of the partial +The server responds by informing the client about the state of the file upload upload: -**Response:** ``` -HTTP/1.1 206 Partial Content -Content-Length: 0 -Content-Range: 0-49/100 +{ + "id": "123d3ebc995732b2", + "url": "http://tus.example.com/files/123d3ebc995732b2", + "received": 0, + "size": 0, + "parts": [] +} ``` @TODO Document resume operation