File diff: [root]/dump @ d71611b7068 | log | faq | css

diff --git a/dump/api b/dump/api
new file mode 100644
index 0000000..b760795
-- /dev/null
++ b/dump/api
@@ -0,0 +1,35 @@
h1. How to use to asynchronously upload 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 file

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

3. If you want to query progress of file upload, you can send GET request to @$token@

bc. curl<...>fumonuso

This returns either an empty string (if 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

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

Fields should be self-descriptive.
\ No newline at end of file

diff --git a/dump/index b/dump/index
index da7a0f1..e3d02f7 100644
-- a/dump/index
++ b/dump/index
@@ -1,3 +1,6 @@
api - Description of API for using from other sites
script - Shell script to use from command line

h1. description


diff --git a/dump/script b/dump/script
new file mode 100644
index 0000000..eb8dd53
-- /dev/null
++ b/dump/script
@@ -0,0 +1 @@
\ No newline at end of file

By Voker57 on 2012-02-03 21:37:38 +0400 Powered by bitcheese wiki engine