From a2977d7d3803e84d063c4714217e6f224add3d99 Mon Sep 17 00:00:00 2001 From: sigoden Date: Thu, 26 May 2022 20:53:05 +0800 Subject: [PATCH] docs: improve readme --- README.md | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ac75da6..c365576 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,7 @@ Duf is a simple file server. - Serve static files - Upload/Delete files - Support basic auth +- Easy to use with curl ## Install @@ -42,12 +43,23 @@ duf folder_name Finally, run this command to see a list of all available option -You can upload file to server with curl. + +## Curl + +Download a file +``` +curl http://127.0.0.1:5000/some-file + +curl -o some-file.zip http://127.0.0.1:5000/some-file.zip +``` + +Upload a file ``` curl --upload-file some-file http://127.0.0.1:5000/some-file ``` -... or delete file/folder with curl + +Delete a file/folder ``` curl -X DELETE http://127.0.0.1:5000/some-file