Diff: [root] @ c9a288f75e7 | faq | css

new dump api

File: dump/api [Diff]

-- a/dump/api++ b/dump/api
@@ -1,38 +1,17 @@
h1. How to use dump.bitcheese.net to asynchronously upload API

h2. Uploading files

1. Generate an unique token for your upload, sending GET request to @http://dump.bitcheese.net/gentoken@

bc. % curl http://dump.bitcheese.net/gentoken

2. Add this token as @token@ form field when uploading a POST //dump.bitcheese.net/upload-file?simple or //dump.bitcheese.net/upload-image?simple
file: file

bc. % curl -F file=@file -F token=nuxyzud<...>wyfumonuso http://dump.bitcheese.net/upload-file?simple

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 @http://dump.bitcheese.net/gettoken/$token@

bc. curl http://dump.bitcheese.net/gettoken/nuxyzu<...>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 http://dump.bitcheese.net/gentoken?format=js
uploader.callback("nuxyzud<...>umonuso"); by its SHA512:

bc. % curl http://dump.bitcheese.net/gettoken/nuxyzud<...>umonuso?format=js
uploader.callback("images/uwegyra/font.png", {

Fields should be self-descriptive. POST //dump.bitcheese.net/search/5b799a5fbf4ecf92304f78932c614fe92cd2146afbb208c5d48654db26e3a9ba4cfd619c3541345c02d6578a35660368a7d6460c5cd46cf7ee90025eb0990e0c?simple

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

File: dump/index [Diff]

-- a/dump/index++ b/dump/index
@@ -1,4 +1,4 @@
api - Description of API for using dump.bitcheese.net from other sites API details
script - Shell script to use dump.bitcheese.net from command line

h1. dump.bitcheese.net description

By Voker57 on 2016-05-09 21:19:06 +0000