From d14e17d94964291fda976423c1fe1a772d5af60b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vojt=C4=9Bch=20Pej=C5=A1a?= Date: Wed, 27 Mar 2019 09:44:29 +0100 Subject: Add CLI arguments for file uploading. --- src/renderer.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/renderer.rs') diff --git a/src/renderer.rs b/src/renderer.rs index 3039dc7..6b3fb9f 100644 --- a/src/renderer.rs +++ b/src/renderer.rs @@ -14,6 +14,7 @@ pub fn page( page_parent: Option, sort_method: Option, sort_order: Option, + file_upload: bool, base: &str, ) -> Markup { html! { @@ -21,11 +22,13 @@ pub fn page( body { span #top { } h1 { (page_title) } + @if file_upload { form action={"/upload?path=" (base)} method="POST" enctype="multipart/form-data" { p { "Select file to upload" } input type="file" name="file_to_upload" {} input type="submit" value="Upload file" {} } + } div.download { (archive_button(archive::CompressionMethod::TarGz)) } -- cgit v1.2.3