diff options
| author | rr- | 2016-05-05 13:40:32 +0200 |
|---|---|---|
| committer | rr- | 2016-05-05 13:46:50 +0200 |
| commit | 148858fde9c676e5885142b7418f3e77f8b4921c (patch) | |
| tree | d0dfcdd7363a438a0b70a85a73d0272583ba1786 /API.md | |
| parent | ab493a01b4028cd4462caa69b8153ca61e9c0679 (diff) | |
server/middleware: download files
Diffstat (limited to 'API.md')
| -rw-r--r-- | API.md | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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 |