Skip to content

Instantly share code, notes, and snippets.

@voidw0rd
Last active August 29, 2015 13:56
Show Gist options
  • Save voidw0rd/8823035 to your computer and use it in GitHub Desktop.
Save voidw0rd/8823035 to your computer and use it in GitHub Desktop.
------------------------------------------------------------------------------
https://www.zuzy.com/ | Web page where you can manage your tokens
create / delete.
API:
POST /<token>/ | upload file and associate it with <token>
GET /<token>/ | download file associated with the <token>
GET /<token>/authorize/ | returns a new <token> that can be used to
down / up files.
------------------------------------------------------------------------------
Use case:
1. Go to https://www.zuzy.com/ create token. ( token = ZZZ )
2. Upload a file using the created token:
`curl -X POST -F filedata=@localdata.raw https://www.zuzy.com/ZZZ/`
3. Download a file using a token:
`wget https://www.zuzy.com/ZZZ/` => localdata.raw
4. Create a new token based on your existing token, that can be used
to download the file that was uploaded using the 'ZZZ' token, upload
new files.
`wget https://www.zuzy.com/ZZZ/authorize/` => {'token': "WWW"}
------------------------------------------------------------------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment