summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/base.tmpl1
-rw-r--r--templates/help.tmpl15
2 files changed, 3 insertions, 13 deletions
diff --git a/templates/base.tmpl b/templates/base.tmpl
index 5c1f894..76d9c99 100644
--- a/templates/base.tmpl
+++ b/templates/base.tmpl
@@ -10,7 +10,6 @@
#end block
</head>
<body>
- $settings
<div id="page">
<div id="page-header">
<h1><a href="$settings.virtual_root">$header</a></h1>
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>.