File diff: [root]/dump/api @ c9a288f75e7 | src | log | faq | css

diff --git a/dump/api b/dump/api
index e547f86..9f9205f 100644
-- a/dump/api
++ b/dump/api
@@ -1,37 +1,16 @@
h1. How to use to asynchronously upload API

h2. Uploading files

1. Generate an unique token for your upload, sending GET request to @

bc. % curl

2. Add this token as @token@ form field when uploading a POST // or //
file: file

bc. % curl -F file=@file -F token=nuxyzud<...>wyfumonuso

3. If you want to query progress of upload

If everything is ok, HTTP 200 with file upload, you url is returned

h2. Searching for files

You can send GET request to @$token@

bc. curl<...>fumonuso

This returns either an empty string (if look up a file isn't uploaded yet or token doesn't exist) or relative path to file, like @files/urobos/file@

@gentoken@ and @gettoken@ are also available in JS format, just append "?format=js" to URI:

bc. % curl
uploader.callback("nuxyzud<...>umonuso"); by its SHA512:

bc. % curl<...>umonuso?format=js
uploader.callback("images/uwegyra/font.png", {

Fields should be self-descriptive. POST //

If everything is ok, HTTP 200 with file url is returned
\ No newline at end of file

By Voker57 on 2016-05-10 00:19:06 +0300 Powered by bitcheese wiki engine