Diff: [root] @ 8b80a50d878 | faq | css

shortened tokens

File: howto/ajax-dump [Diff]

-- a/howto/ajax-dump++ b/howto/ajax-dump
@@ -3,16 +3,16 @@
1. Generate an unique token for your upload, sending GET request to @http://dump.bitcheese.net/gentoken@

bc. % curl http://dump.bitcheese.net/gentoken
nuxyzudabykubyxovyfuvorogijonivizigyjuruhogonywylisegomejopijegonimofohinolirotycikejemabibasykusyxajyxatuzajocipititotoxahosylelukarefyxumutidynysunygojykugyromikimixacitycoharupypuminobuwalafepopycosezocyniragogojaxomolapazobijagozapynebonirenuzaxakunavujadywaracejamivisesacipekivowyvodedodanyhoxexugokavahygilitylugyhakacuzefaxomofecohurapaxotulinaxafuwuzecybufosocibahiryjynigejudatodyforenafevocefasamifulunakavitinybomybofomuwydikelirirozuburufehyfijevamibyvugepesamakabivakosonalaginonywumogerumoziciguxilulunesurazybokilixasujatycixasimyjodexykozadivodysecuwahilutetiryzemufilozofarorijefyjademujagakyfydililawamovizahorijurizyjatogylyhylelomakimowyfumonuso
nuxyzud<...>umonuso

2. Add this token as @token@ form field when uploading a file

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

3. If you want to query progress of file upload, you can send GET request to @http://dump.bitcheese.net/gettoken/$token@

bc. curl http://dump.bitcheese.net/gettoken/nuxyzudabykubyxovyfuvorogijonivizigyjuruhogonywylisegomejopijegonimofohinolirotycikejemabibasykusyxajyxatuzajocipititotoxahosylelukarefyxumutidynysunygojykugyromikimixacitycoharupypuminobuwalafepopycosezocyniragogojaxomolapazobijagozapynebonirenuzaxakunavujadywaracejamivisesacipekivowyvodedodanyhoxexugokavahygilitylugyhakacuzefaxomofecohurapaxotulinaxafuwuzecybufosocibahiryjynigejudatodyforenafevocefasamifulunakavitinybomybofomuwydikelirirozuburufehyfijevamibyvugepesamakabivakosonalaginonywumogerumoziciguxilulunesurazybokilixasujatycixasimyjodexykozadivodysecuwahilutetiryzemufilozofarorijefyjademujagakyfydililawamovizahorijurizyjatogylyhylelomakimowyfumonuso http://dump.bitcheese.net/gettoken/nuxyzu<...>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@

By Voker57 on 2010-10-27 11:13:28 +0000