summaryrefslogtreecommitdiff
path: root/templates/help.tmpl
diff options
context:
space:
mode:
Diffstat (limited to 'templates/help.tmpl')
-rw-r--r--templates/help.tmpl15
1 files changed, 3 insertions, 12 deletions
diff --git a/templates/help.tmpl b/templates/help.tmpl
index 6451b25..afba84a 100644
--- a/templates/help.tmpl
+++ b/templates/help.tmpl
@@ -2,19 +2,10 @@
#def header: help
#extends templates.base
#def content
- <p>Usage: POST to <a href="$scheme://${host}${settings.virtual_root}u">$scheme://${host}${settings.virtual_root}u</a> with filedata given to "file" and original filename to "filename".
- Login is sent by cookies with either:
- <ul>
- <li>user id in "uid" and an identifier which is sha1(uid+sha1(password))</li>
- </ul>
- or
- <ul>
- <li>username in "username" and an identifier which is sha1(username+sha1(password))</li>
- </ul>
- </p>
+ <p>Usage: POST to <a href="$scheme://${host}${settings.virtual_root}u">$scheme://${host}${settings.virtual_root}u</a> with filedata given to "file" and original filename to "filename". Login is done by generating a login token and sending it as the cookie "token".</p>
+ <p>TODO: Add info on how to generate a login token.</p>
<p>cURL example:
- <blockquote><code>curl -b 'uid=42; identifier=360b411581c3d516c8d55c290f039b144cea79ad' -F 'file=@image.png' -F 'filename=image.png' -F 'api=1' http://myhost/u</code></blockquote>
- Here user id is 42 and the password is "foobar".
+ <blockquote><code>curl -b 'token=foo' -F 'file=@image.png' -F 'filename=image.png' -F 'api=1' http://myhost/u</code></blockquote>
If you get HTTP 417 responses, try adding:<code>-H 'Expect:'</code>.</p>
<p>By adding the key-value pair "api=1" you will get machine-readable responses in the form: <code>response result</code> where <code>response</code> is either <code>ERROR</code> or <code>OK</code>,
and <code>result</code> is the file hash in the case of <code>OK</code>, or an error message in the case of <code>ERROR</code>.