Optional headers with the request
+{% if not forcerandom %}Randomize the filename
Linx-Randomize: yes
Specify a custom deletion key
Linx-Delete-Key: mysecret
“url”: the publicly available upload url
+ “direct_url”: the url to access the file directly
“filename”: the (optionally generated) filename
“delete_key”: the (optionally generated) deletion key,
“expiry”: the unix timestamp at which the file will expire (0 if never)
@@ -55,30 +58,30 @@ {% if using_auth %}+{{ siteurl }}{% if not forcerandom %}myphoto.jpg{% else %}7z4h4ut.jpg{% endif %} {% else %}$ curl -H "Linx-Api-Key: mysecretkey" -T myphoto.jpg {{ siteurl }}upload/ -{{ siteurl }}myphoto.jpg
+{{ siteurl }}{% if not forcerandom %}myphoto.jpg{% else %}wtq7pan.jpg{% endif %} {% endif %}$ curl -T myphoto.jpg {{ siteurl }}upload/ -{{ siteurl }}myphoto.jpg
Uploading myphoto.jpg with an expiry of 20 minutes
{% if using_auth %}+{{ siteurl }}{% if not forcerandom %}myphoto.jpg{% else %}jm295snf.jpg{% endif %} {% else %}$ curl -H "Linx-Api-Key: mysecretkey" -H "Linx-Expiry: 1200" -T myphoto.jpg {{ siteurl }}upload/ -{{ siteurl }}myphoto.jpg
+{{ siteurl }}{% if not forcerandom %}myphoto.jpg{% else %}1doym9u2.jpg{% endif %} {% endif %}$ curl -H "Linx-Expiry: 1200" -T myphoto.jpg {{ siteurl }}upload/ -{{ siteurl }}myphoto.jpg
Uploading myphoto.jpg with a random filename and getting a json response:
{% if using_auth %} -$ curl -H "Linx-Api-Key: mysecretkey" -H "Accept: application/json" -H "Linx-Randomize: yes" -T myphoto.jpg {{ siteurl }}upload/ +
{% else %} -$ 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", "sha256sum":"...","size":"...","url":"{{ siteurl }}f34h4iu.jpg"}
$ curl -H "Accept: application/json" -H "Linx-Randomize: yes" -T myphoto.jpg {{ siteurl }}upload/ +
{% endif %} @@ -121,6 +124,7 @@ DELETED$ 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", "sha256sum":"...","size":"...","url":"{{ siteurl }}f34h4iu.jpg"}
“url”: the publicly available upload url
+ “direct_url”: the url to access the file directly
“filename”: the (optionally generated) filename
“expiry”: the unix timestamp at which the file will expire (0 if never)
“size”: the size in bytes of the file
diff --git a/templates/base.html b/templates/base.html index d750cb4..d1411d4 100644 --- a/templates/base.html +++ b/templates/base.html @@ -3,7 +3,8 @@{% block title %}{{ sitename }}{% endblock %} - + + {% block head %}{% endblock %} diff --git a/templates/display/audio.html b/templates/display/audio.html index 5e49f8a..65490b7 100644 --- a/templates/display/audio.html +++ b/templates/display/audio.html @@ -2,8 +2,8 @@ {% block main %}Download diff --git a/templates/display/base.html b/templates/display/base.html index 587e76f..935979f 100644 --- a/templates/display/base.html +++ b/templates/display/base.html @@ -6,32 +6,22 @@ {% block content %} --++{{ filename }}-+{% if expiry %} file expires in {{ expiry }} | {% endif %} {% block infomore %}{% endblock %} {{ size }} | - {% if shorturlEnabled %} - {% if shorturl %} - {{shorturl}} | - {% else %} - short url | - {% endif %} - {% endif %} torrent | - get + get{% block infoleft %}{% endblock %} -@@ -43,8 +33,4 @@- - {% if shorturlEnabled %} - - {% endif %} {% endblock %} diff --git a/templates/display/bin.html b/templates/display/bin.html index 12e49c9..c3ee97c 100644 --- a/templates/display/bin.html +++ b/templates/display/bin.html @@ -11,37 +11,34 @@ {% block infoleft %}-