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...) and curl, you can download and use these scripts:

Name Download link
upload_file.sh Download
shrink_url.sh Download

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_file.sh path/to/file
upload_file.sh path/to/file my_very_important_file.png
shrink_url.sh https://gitlab.com/ArisuOngaku/ilyli
shrink_url.sh https://gitlab.com/ArisuOngaku/ilyli repo

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 Required? Value(s)
File upload
type Request type Yes file
upload File field Yes The actual file contents
ttl How much time (in seconds) to keep the file No 0 (never delete), 30 (delete after 30s)
url_domain Choose domain name No {{ allowed_domains.join('|') }}
URL shrink
type Request type Yes url
target_url Target url Yes A valid URL starting with https:// or http://
url_domain Choose domain name No {{ allowed_domains.join('|') }}

For examples with curl, please download and review the scripts above.

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() }}