aboutsummaryrefslogtreecommitdiff
path: root/API.md
diff options
context:
space:
mode:
authorrr-2016-05-05 13:40:32 +0200
committerrr-2016-05-05 13:46:50 +0200
commit148858fde9c676e5885142b7418f3e77f8b4921c (patch)
treed0dfcdd7363a438a0b70a85a73d0272583ba1786 /API.md
parentab493a01b4028cd4462caa69b8153ca61e9c0679 (diff)
server/middleware: download files
Diffstat (limited to 'API.md')
-rw-r--r--API.md7
1 files changed, 7 insertions, 0 deletions
diff --git a/API.md b/API.md
index 2835d3f..904fbee 100644
--- a/API.md
+++ b/API.md
@@ -106,6 +106,13 @@ Requests that upload files must use `multipart/form-data` encoding. JSON
metadata must then be included as field of name `metadata`, whereas files must
be included as separate fields with names specific to each request type.
+Alternatively, the server can download the files from the Internet on client's
+behalf. In that case, the request doesn't need to be specially encoded in any
+way. The files, however, should be passed as regular fields appended with `Url`
+suffix. For example, to download a file named `content` from
+`http://example.com/file.jpg`, the client should pass
+`{"contentUrl":"http://example.com/file.jpg"}` as part of the message body.
+
## Error handling
All errors (except for unhandled fatal server errors) send relevant HTTP status

© 2015 - 2026 Jakob L. Kreuze