From 48cf65591771361ded66032cc2ae072b1bb3647c Mon Sep 17 00:00:00 2001
From: Alice Gaudon If you have the sh shell on your machine (i.e. you are on linux, git bash on windows...), you can
- download this script. 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: 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).
First alternative: sh script (native on linux)
-
+
+
+
+
+
+ Name
+ Download link
+
+
+ upload_file.sh
+ Download
+
+
+
+ shorten_url.sh
+ Download
+ $HOME/.ily_token
).
Examples:
-upload_script.sh path/to/file-
upload_script.sh path/to/file my_very_important_file.png+
upload_file.sh path/to/file+
upload_file.sh path/to/file my_very_important_file.png+
shorten_url.sh https://gitlab.com/ArisuOngaku/ilyli+
shorten_url.sh https://gitlab.com/ArisuOngaku/ilyli repo
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/+
For examples with curl, please download and review the scripts above.