@ -25,8 +25,10 @@
< p > < strong > Optional headers with the request< / strong > < / p >
< p > < strong > Optional headers with the request< / strong > < / p >
{% if not forcerandom %}
< p > Randomize the filename< br / >
< p > Randomize the filename< br / >
< code > Linx-Randomize: yes< / code > < / p >
< code > Linx-Randomize: yes< / code > < / p >
{% endif %}
< p > Specify a custom deletion key< br / >
< p > Specify a custom deletion key< br / >
< code > Linx-Delete-Key: mysecret< / code > < / p >
< code > Linx-Delete-Key: mysecret< / code > < / p >
@ -56,30 +58,30 @@
{% if using_auth %}
{% if using_auth %}
< pre > < code > $ curl -H " Linx-Api-Key: mysecretkey" -T myphoto.jpg {{ siteurl }}upload/
< pre > < code > $ curl -H " Linx-Api-Key: mysecretkey" -T myphoto.jpg {{ siteurl }}upload/
{{ siteurl }}myphoto.jpg< / code > < / pre >
{{ siteurl }}{% if not forcerandom %} myphoto.jpg{% else %}7z4h4ut.jpg{% endif %} < / code > < / pre >
{% else %}
{% else %}
< pre > < code > $ curl -T myphoto.jpg {{ siteurl }}upload/
< pre > < code > $ curl -T myphoto.jpg {{ siteurl }}upload/
{{ siteurl }}myphoto.jpg< / code > < / pre >
{{ siteurl }}{% if not forcerandom %} myphoto.jpg{% else %}wtq7pan.jpg{% endif %} < / code > < / pre >
{% endif %}
{% endif %}
< p > Uploading myphoto.jpg with an expiry of 20 minutes< / p >
< p > Uploading myphoto.jpg with an expiry of 20 minutes< / p >
{% if using_auth %}
{% if using_auth %}
< pre > < code > $ curl -H " Linx-Api-Key: mysecretkey" -H " Linx-Expiry: 1200" -T myphoto.jpg {{ siteurl }}upload/
< pre > < code > $ curl -H " Linx-Api-Key: mysecretkey" -H " Linx-Expiry: 1200" -T myphoto.jpg {{ siteurl }}upload/
{{ siteurl }}myphoto.jpg< / code > < / pre >
{{ siteurl }}{% if not forcerandom %} myphoto.jpg{% else %}jm295snf.jpg{% endif %} < / code > < / pre >
{% else %}
{% else %}
< pre > < code > $ curl -H " Linx-Expiry: 1200" -T myphoto.jpg {{ siteurl }}upload/
< pre > < code > $ curl -H " Linx-Expiry: 1200" -T myphoto.jpg {{ siteurl }}upload/
{{ siteurl }}myphoto.jpg< / code > < / pre >
{{ siteurl }}{% if not forcerandom %} myphoto.jpg{% else %}1doym9u2.jpg{% endif %} < / code > < / pre >
{% endif %}
{% endif %}
< 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" {% if not forcerandom %} -H " Linx-Randomize: yes" {% endif %} -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" :" {{ siteurl }}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" {% if not forcerandom %} -H " Linx-Randomize: yes" {% endif %} -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" :" {{ siteurl }}f34h4iu.jpg" }< / code > < / pre >
" sha256sum" :" ..." ," size" :" ..." ," url" :" {{ siteurl }}f34h4iu.jpg" }< / code > < / pre >
{% endif %}
{% endif %}