|
@ -74,13 +74,13 @@ |
|
|
<p>Uploading myphoto.jpg with a random filename and getting a json response:</p> |
|
|
<p>Uploading myphoto.jpg with a random filename and getting a json response:</p> |
|
|
|
|
|
|
|
|
{% if using_auth %} |
|
|
{% if using_auth %} |
|
|
<pre><code>$ curl -H "Linx-Api-Key: mysecretkey" -H "Accept: application/json" -H "Linx-Randomize: yes" -T myphoto.jpg {{ siteurl }}/upload/ |
|
|
|
|
|
|
|
|
<pre><code>$ curl -H "Linx-Api-Key: mysecretkey" -H "Accept: application/json" -H "Linx-Randomize: yes" -T myphoto.jpg {{ siteurl }}upload/ |
|
|
{"delete_key":"...","expiry":"0","filename":"f34h4iu.jpg","mimetype":"image/jpeg", |
|
|
{"delete_key":"...","expiry":"0","filename":"f34h4iu.jpg","mimetype":"image/jpeg", |
|
|
"sha256sum":"...","size":"...","url":"{{ steurl }}/f34h4iu.jpg"}</code></pre> |
|
|
|
|
|
|
|
|
"sha256sum":"...","size":"...","url":"{{ siteurl }}f34h4iu.jpg"}</code></pre> |
|
|
{% else %} |
|
|
{% else %} |
|
|
<pre><code>$ curl -H "Accept: application/json" -H "Linx-Randomize: yes" -T myphoto.jpg {{ siteurl }}/upload/ |
|
|
<pre><code>$ curl -H "Accept: application/json" -H "Linx-Randomize: yes" -T myphoto.jpg {{ siteurl }}/upload/ |
|
|
{"delete_key":"...","expiry":"0","filename":"f34h4iu.jpg","mimetype":"image/jpeg", |
|
|
{"delete_key":"...","expiry":"0","filename":"f34h4iu.jpg","mimetype":"image/jpeg", |
|
|
"sha256sum":"...","size":"...","url":"{{ steurl }}/f34h4iu.jpg"}</code></pre> |
|
|
|
|
|
|
|
|
"sha256sum":"...","size":"...","url":"{{ siteurl }}f34h4iu.jpg"}</code></pre> |
|
|
{% endif %} |
|
|
{% endif %} |
|
|
|
|
|
|
|
|
<h3>Overwriting a file</h3> |
|
|
<h3>Overwriting a file</h3> |
|
|