Update desktop utility instructions
This commit is contained in:
parent
e911089c97
commit
48cf655917
@ -7,13 +7,33 @@
|
|||||||
<hr>
|
<hr>
|
||||||
<section>
|
<section>
|
||||||
<h3>First alternative: sh script (native on linux)</h3>
|
<h3>First alternative: sh script (native on linux)</h3>
|
||||||
<p>If you have the sh shell on your machine (i.e. you are on linux, git bash on windows...), you can
|
<p>If you have the sh shell on your machine (i.e. you are on linux, git bash on windows...) and curl, you can
|
||||||
<a href="{{ route('file-linux-script') }}">download this script</a>.</p>
|
download and use these scripts:</p>
|
||||||
|
<table class="data-table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Name</th>
|
||||||
|
<th>Download link</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>upload_file.sh</td>
|
||||||
|
<td><a href="{{ route('file-linux-script') }}">Download</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>shorten_url.sh</td>
|
||||||
|
<td><a href="{{ route('url-linux-script') }}">Download</a></td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
<p>You must put a valid auth token (generated in the form at the bottom of this page) in a .ily_token
|
<p>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).</p>
|
file in your home directory (<code>$HOME/.ily_token</code>).</p>
|
||||||
<p>Examples:</p>
|
<p>Examples:</p>
|
||||||
<pre>upload_script.sh path/to/file</pre>
|
<pre>upload_file.sh path/to/file</pre>
|
||||||
<pre>upload_script.sh path/to/file my_very_important_file.png</pre>
|
<pre>upload_file.sh path/to/file my_very_important_file.png</pre>
|
||||||
|
<pre>shorten_url.sh https://gitlab.com/ArisuOngaku/ilyli</pre>
|
||||||
|
<pre>shorten_url.sh https://gitlab.com/ArisuOngaku/ilyli repo</pre>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
@ -34,44 +54,52 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th>Field name</th>
|
<th>Field name</th>
|
||||||
<th>Description</th>
|
<th>Description</th>
|
||||||
<th>Optional?</th>
|
<th>Required?</th>
|
||||||
<th>Example</th>
|
<th>Value(s)</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td>upload</td>
|
<th colspan="4">File upload</th>
|
||||||
<td>The file field</td>
|
</tr>
|
||||||
<td>No</td>
|
<tr>
|
||||||
<td>-</td>
|
<td>type</td>
|
||||||
|
<td>Request type</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
<td>file</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>upload</td>
|
||||||
|
<td>File field</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
<td>The actual file contents</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>ttl</td>
|
<td>ttl</td>
|
||||||
<td>How much time (in seconds) to keep the file</td>
|
<td>How much time (in seconds) to keep the file</td>
|
||||||
<td>Yes</td>
|
<td>No</td>
|
||||||
<td>0 (never delete), 30 (delete after 30s)</td>
|
<td>0 (never delete), 30 (delete after 30s)</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<th colspan="4">URL shorten</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>type</td>
|
||||||
|
<td>Request type</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
<td>url</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>target_url</td>
|
||||||
|
<td>Target url</td>
|
||||||
|
<td>Yes</td>
|
||||||
|
<td>A valid URL starting with https:// or http://</td>
|
||||||
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<p>Example with curl:</p>
|
<p>For examples with curl, please download and review the scripts above.</p>
|
||||||
<pre>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/</pre>
|
|
||||||
<pre>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</pre>
|
|
||||||
<pre>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/</pre>
|
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user