From 5bcfa4ac832a9457ed32ff377febf6e284c5e1d5 Mon Sep 17 00:00:00 2001 From: Sheepy Date: Sat, 25 Jun 2022 19:02:02 -0500 Subject: Create directory (#781) * Add ability to make directory Frontend for making directories Fix potential security vulnerability (CWE-23) Add tests Update README.md Disallow using parent directories altogether Fix formatting Fix clippy warnings Address review comments Update README.md Change `making` to `creation` Co-authored-by: Sven-Hendrik Haase Have make directory flag require file upload flag Address review comments * Disallow uploading files and making directories through symlinks when disabled * Add test * Clippy formatting changes * Add test doc comment --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'README.md') diff --git a/README.md b/README.md index 3ad0fbf..4a1d22c 100644 --- a/README.md +++ b/README.md @@ -70,6 +70,15 @@ Sometimes this is just a more practical and quick way than doing things properly (where `$FILE` is the path to the file. This uses miniserve's default port of 8080) +### Create a directory using `curl`: + + # in one terminal + miniserve --upload-files --mkdir . + # in another terminal + curl -F "mkdir=$DIR_NAME" http://localhost:8080/upload\?path=\/ + +(where `$DIR_NAME` is the name of the directory. This uses miniserve's default port of 8080.) + ### Take pictures and upload them from smartphones: miniserve -u -m image -q @@ -86,6 +95,7 @@ Some mobile browsers like Firefox on Android will offer to open the camera app w - Mega fast and highly parallel (thanks to [Rust](https://www.rust-lang.org/) and [Actix](https://actix.rs/)) - Folder download (compressed on the fly as `.tar.gz` or `.zip`) - File uploading +- Directory creation - Pretty themes (with light and dark theme support) - Scan QR code for quick access - Shell completions @@ -216,6 +226,9 @@ Some mobile browsers like Firefox on Android will offer to open the camera app w -u, --upload-files Enable file uploading + -U --mkdir + Enable directory creating + -v, --verbose Be verbose, includes emitting access logs -- cgit v1.2.3