From 9ac016c3b57aff5de7c3a2e88fb1880fb0eb565d Mon Sep 17 00:00:00 2001 From: andreimarcu Date: Sun, 11 Oct 2015 20:28:46 -0400 Subject: [PATCH] Document overwriting a file --- templates/API.html | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/templates/API.html b/templates/API.html index c4225e1..68cf035 100644 --- a/templates/API.html +++ b/templates/API.html @@ -59,6 +59,17 @@ {"delete_key":"...","expiry":"0","filename":"f34h4iu.jpg","mimetype":"image/jpeg", "sha256sum":"...","size":"...","url":"{{ steurl }}/f34h4iu.jpg"} +

Overwriting a file

+ +

To overwrite a file you uploaded, simply provide the Linx-Delete-Key header with the original file's deletion key.

+ +

Example

+ +

To overwrite myphoto.jpg

+ +
$ curl -H "Linx-Delete-Key: mysecret" -T myphoto.jpg {{ siteurl }}upload/
+{{ siteurl }}myphoto.jpg
+

Deleting a file

To delete a file you uploaded, make a DELETE request to {{ siteurl }}yourfile.ext with the delete key set as the Linx-Delete-Key header.