diff --git a/src/item_explanation.md b/src/item_explanation.md index 19d5af1..9f54269 100644 --- a/src/item_explanation.md +++ b/src/item_explanation.md @@ -1,8 +1,8 @@ # zettoIT bin -An empty bin was created for you. The first HTTP POST request can upload data. +An empty bin was created for you. The first HTTP POST or PUT request can upload data. All following requests can only read the uploaded data. -To use the build-in link-shortener functionality you have to POST the URL with Content-Type: text/x-uri or Content-Type: text/uri-list. +To use the build-in link-shortener functionality you have to POST or PUT the URL with Content-Type: text/x-uri or Content-Type: text/uri-list. To change the default expiration date of one month, you can use the `?ttl=` parameter. It supports durations like `60s`, `60m`, `24h`, `30d`, `12M`, `1y` or iso dates like `1970-01-01T00:00:00` in UTC timezone. @@ -10,18 +10,18 @@ To change the default expiration date of one month, you can use the `?ttl=` para `$ curl -H "Content-Type: text/x-uri" --data "https://example.com" ` ## Upload a image -`$ curl -H "Content-Type: image/png" --data-binary @my-image.png ` +`$ curl -H "Content-Type: image/png" -T my-image.png ` ## Upload a big file `$ curl -X POST -H "Content-Type: application/gzip" -T my-file.tar.gz ` ## Pipe into curl -`$ tar -cz my-files* | curl -X POST -H "Content-Type: application/gzip" -T - ` +`$ tar -cz my-files | curl -H "Content-Type: application/gzip" -T - ` ## Enryption ``` $ tar -cz my-files | gpg -co tmp.tar.gz -$ curl -X POST -H "Content-Type: application/octet-stream" -T tmp.tar.gz +$ curl -H "Content-Type: application/octet-stream" -T tmp.tar.gz $ curl | gpg -d - | tar -xzf ```