Setup a desktop utility

There may be a desktop client at some point. For now, if you're an advanced user, you can setup scripts/macros.


First alternative: sh script (native on linux)

If you have the sh shell on your machine (i.e. you are on linux, git bash on windows...), you can download this script.

You must put a valid auth token (generated in the form at the bottom of this page) in a .ily_token file in your home directory ($HOME/.ily_token).

Examples:

upload_script.sh path/to/file
upload_script.sh path/to/file my_very_important_file.png

Second alternative: implement your own client

To upload the file, you must:

  • Set the "Authorization" HTTP header to an auth token (generate one with the form below)
  • Make a proper file upload request either with the method "POST" on / (auto-generates a short url) or "PUT" (choose the target url you want, alphanum)
Field name Description Optional? Example
upload The file field No -
ttl How much time (in seconds) to keep the file Yes 0 (never delete), 30 (delete after 30s)

Example with curl:

curl -X POST -H 'Accept: application/json' \
-H "Authorization: very_secret_and_personal_token" \
-F 'type=file' \
-F 'upload=@path/to/local/file' \
https://ily.li/
curl -X PUT -H 'Accept: application/json' \
-H "Authorization: very_secret_and_personal_token" \
-F 'type=file' \
-F 'upload=@path/to/local/file' \
https://ily.li/my_very_important_file.png
curl -X POST -H 'Accept: application/json' \
-H "Authorization: very_secret_and_personal_token" \
-F 'type=file' \
-F 'upload=@path/to/local/file' \
-F 'ttl=30' \
https://ily.li/

Auth tokens

{{ macros.csrf(getCSRFToken) }}
{% for token in auth_tokens %} {% endfor %}
# Secret Created at Last used at Actions
{{ token.id }}
{{ token.secret }}
{{ token.created_at.toISOString() }} {{ token.used_at.toISOString() }}