From 4203fc161b844a33cf8bd8be036b5dddd4850b04 Mon Sep 17 00:00:00 2001 From: ed Date: Sun, 30 Oct 2022 16:31:04 +0000 Subject: [PATCH] misc --- contrib/README.md | 2 +- copyparty/httpcli.py | 4 +++- copyparty/up2k.py | 15 +++++++++------ docs/devnotes.md | 2 +- 4 files changed, 14 insertions(+), 9 deletions(-) diff --git a/contrib/README.md b/contrib/README.md index a580069f..650ab6bb 100644 --- a/contrib/README.md +++ b/contrib/README.md @@ -30,7 +30,7 @@ however if your copyparty is behind a reverse-proxy, you may want to use [`share * makes it way faster (especially for slow/networked locations (such as copyparty-fuse)) ### [`webdav-basicauth.reg`](webdav-basicauth.reg) -* enables webdav basic-auth over plaintext http +* enables webdav basic-auth over plaintext http; takes effect after a reboot OR after running `webdav-unlimit.bat` ### [`webdav-unlimit.bat`](webdav-unlimit.bat) * removes the 47.6 MiB filesize limit when downloading from webdav diff --git a/copyparty/httpcli.py b/copyparty/httpcli.py index 2b430f50..a6a43c52 100644 --- a/copyparty/httpcli.py +++ b/copyparty/httpcli.py @@ -2968,7 +2968,9 @@ class HttpCli(object): self.log("wrong filekey, want {}, got {}".format(correct, got)) return self.tx_404() - if abspath.endswith(".md") and "v" in self.uparam: + if abspath.endswith(".md") and ( + "v" in self.uparam or "edit" in self.uparam or "edit2" in self.uparam + ): return self.tx_md(abspath) return self.tx_file(abspath) diff --git a/copyparty/up2k.py b/copyparty/up2k.py index 90ee2891..ba9068b8 100644 --- a/copyparty/up2k.py +++ b/copyparty/up2k.py @@ -2991,12 +2991,15 @@ class Up2k(object): if x["need"] and now - x["poke"] > self.snap_discard_interval ] - lost = [ - x - for x in reg.values() - if x["need"] - and not bos.path.exists(os.path.join(x["ptop"], x["prel"], x["name"])) - ] + if self.args.nw: + lost = [] + else: + lost = [ + x + for x in reg.values() + if x["need"] + and not bos.path.exists(os.path.join(x["ptop"], x["prel"], x["name"])) + ] if rm or lost: t = "dropping {} abandoned, {} deleted uploads in {}" diff --git a/docs/devnotes.md b/docs/devnotes.md index 23518186..268d1219 100644 --- a/docs/devnotes.md +++ b/docs/devnotes.md @@ -41,7 +41,7 @@ as a result, the hashes are much less useful than they could have been (search t however it allows for hashing multiple chunks in parallel, greatly increasing upload speed from fast storage (NVMe, raid-0 and such) -* both the [browser uploader](#uploading) and the [commandline one](https://github.com/9001/copyparty/blob/hovudstraum/bin/up2k.py) does this now, allowing for fast uploading even from plaintext http +* both the [browser uploader](https://github.com/9001/copyparty#uploading) and the [commandline one](https://github.com/9001/copyparty/blob/hovudstraum/bin/up2k.py) does this now, allowing for fast uploading even from plaintext http hashwasm would solve the streaming issue but reduces hashing speed for sha512 (xxh128 does 6 GiB/s), and it would make old browsers and [iphones](https://bugs.webkit.org/show_bug.cgi?id=228552) unsupported