copyparty 1.16.17__tar.gz → 1.16.19__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {copyparty-1.16.17 → copyparty-1.16.19}/PKG-INFO +18 -5
- {copyparty-1.16.17 → copyparty-1.16.19}/README.md +15 -3
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/__init__.py +1 -1
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/__main__.py +26 -2
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/__version__.py +2 -2
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/authsrv.py +62 -9
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/cfg.py +5 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/ftpd.py +11 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/httpcli.py +57 -19
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/ico.py +13 -2
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/mtag.py +1 -2
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/pwhash.py +1 -1
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/svchub.py +151 -63
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/szip.py +1 -2
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/tcpsrv.py +18 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/tftpd.py +29 -8
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/th_cli.py +23 -4
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/th_srv.py +16 -3
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/u2idx.py +2 -2
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/up2k.py +12 -7
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/util.py +110 -5
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/web/browser.css.gz +0 -0
- copyparty-1.16.19/copyparty/web/browser.js.gz +0 -0
- copyparty-1.16.19/copyparty/web/deps/marked.js.gz +0 -0
- copyparty-1.16.19/copyparty/web/ui.css.gz +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty.egg-info/PKG-INFO +18 -5
- copyparty-1.16.17/copyparty/web/browser.js.gz +0 -0
- copyparty-1.16.17/copyparty/web/deps/marked.js.gz +0 -0
- copyparty-1.16.17/copyparty/web/ui.css.gz +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/LICENSE +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/bos/__init__.py +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/bos/bos.py +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/bos/path.py +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/broker_mp.py +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/broker_mpw.py +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/broker_thr.py +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/broker_util.py +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/cert.py +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/dxml.py +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/fsutil.py +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/httpconn.py +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/httpsrv.py +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/mdns.py +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/metrics.py +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/multicast.py +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/res/COPYING.txt +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/res/__init__.py +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/res/insecure.pem +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/smbd.py +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/ssdp.py +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/star.py +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/stolen/__init__.py +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/stolen/dnslib/__init__.py +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/stolen/dnslib/bimap.py +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/stolen/dnslib/bit.py +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/stolen/dnslib/buffer.py +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/stolen/dnslib/dns.py +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/stolen/dnslib/label.py +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/stolen/dnslib/lex.py +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/stolen/dnslib/ranges.py +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/stolen/ifaddr/__init__.py +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/stolen/ifaddr/_posix.py +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/stolen/ifaddr/_shared.py +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/stolen/ifaddr/_win32.py +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/stolen/qrcodegen.py +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/stolen/surrogateescape.py +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/sutil.py +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/web/a/__init__.py +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/web/a/partyfuse.py +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/web/a/u2c.py +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/web/a/webdav-cfg.bat +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/web/baguettebox.js.gz +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/web/browser.html +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/web/browser2.html +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/web/cf.html +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/web/dbg-audio.js.gz +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/web/dd/2.png +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/web/dd/3.png +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/web/dd/4.png +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/web/dd/5.png +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/web/dd/__init__.py +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/web/deps/__init__.py +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/web/deps/busy.mp3.gz +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/web/deps/easymde.css.gz +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/web/deps/easymde.js.gz +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/web/deps/fuse.py +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/web/deps/mini-fa.css.gz +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/web/deps/mini-fa.woff +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/web/deps/prism.css.gz +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/web/deps/prism.js.gz +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/web/deps/prismd.css.gz +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/web/deps/scp.woff2 +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/web/deps/sha512.ac.js.gz +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/web/deps/sha512.hw.js.gz +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/web/md.css.gz +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/web/md.html +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/web/md.js.gz +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/web/md2.css.gz +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/web/md2.js.gz +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/web/mde.css.gz +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/web/mde.html +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/web/mde.js.gz +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/web/msg.css.gz +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/web/msg.html +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/web/rups.css.gz +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/web/rups.html +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/web/rups.js.gz +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/web/shares.css.gz +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/web/shares.html +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/web/shares.js.gz +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/web/splash.css.gz +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/web/splash.html +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/web/splash.js.gz +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/web/svcs.html +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/web/svcs.js.gz +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/web/up2k.js.gz +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/web/util.js.gz +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty/web/w.hash.js.gz +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty.egg-info/SOURCES.txt +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty.egg-info/dependency_links.txt +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty.egg-info/entry_points.txt +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty.egg-info/requires.txt +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/copyparty.egg-info/top_level.txt +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/pyproject.toml +0 -0
- {copyparty-1.16.17 → copyparty-1.16.19}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.4
|
2
2
|
Name: copyparty
|
3
|
-
Version: 1.16.
|
3
|
+
Version: 1.16.19
|
4
4
|
Summary: Portable file server with accelerated resumable uploads, deduplication, WebDAV, FTP, zeroconf, media indexer, video thumbnails, audio transcoding, and write-only folders
|
5
5
|
Author-email: ed <copyparty@ocv.me>
|
6
6
|
License: MIT
|
@@ -54,6 +54,7 @@ Provides-Extra: pwhash
|
|
54
54
|
Requires-Dist: argon2-cffi; extra == "pwhash"
|
55
55
|
Provides-Extra: zeromq
|
56
56
|
Requires-Dist: pyzmq; extra == "zeromq"
|
57
|
+
Dynamic: license-file
|
57
58
|
|
58
59
|
<img src="https://github.com/9001/copyparty/raw/hovudstraum/docs/logo.svg" width="250" align="right"/>
|
59
60
|
|
@@ -157,7 +158,7 @@ turn almost any device into a file server with resumable uploads/downloads using
|
|
157
158
|
* [custom mimetypes](#custom-mimetypes) - change the association of a file extension
|
158
159
|
* [GDPR compliance](#GDPR-compliance) - imagine using copyparty professionally...
|
159
160
|
* [feature chickenbits](#feature-chickenbits) - buggy feature? rip it out
|
160
|
-
* [feature beefybits](#feature-beefybits) - force-enable
|
161
|
+
* [feature beefybits](#feature-beefybits) - force-enable features with known issues on your OS/env
|
161
162
|
* [packages](#packages) - the party might be closer than you think
|
162
163
|
* [arch package](#arch-package) - now [available on aur](https://aur.archlinux.org/packages/copyparty) maintained by [@icxes](https://github.com/icxes)
|
163
164
|
* [fedora package](#fedora-package) - does not exist yet
|
@@ -338,6 +339,8 @@ small collection of user feedback
|
|
338
339
|
|
339
340
|
`good enough`, `surprisingly correct`, `certified good software`, `just works`, `why`, `wow this is better than nextcloud`
|
340
341
|
|
342
|
+
* UI просто ужасно. Если буду описывать детально не смогу удержаться в рамках приличий
|
343
|
+
|
341
344
|
|
342
345
|
# motivations
|
343
346
|
|
@@ -386,7 +389,8 @@ roughly sorted by chance of encounter
|
|
386
389
|
* `--th-ff-jpg` may fix video thumbnails on some FFmpeg versions (macos, some linux)
|
387
390
|
* `--th-ff-swr` may fix audio thumbnails on some FFmpeg versions
|
388
391
|
* if the `up2k.db` (filesystem index) is on a samba-share or network disk, you'll get unpredictable behavior if the share is disconnected for a bit
|
389
|
-
* use `--hist` or the `hist` volflag (`-v [...]:c,hist=/tmp/foo`) to place the db on a local disk instead
|
392
|
+
* use `--hist` or the `hist` volflag (`-v [...]:c,hist=/tmp/foo`) to place the db and thumbnails on a local disk instead
|
393
|
+
* or, if you only want to move the db (and not the thumbnails), then use `--dbpath` or the `dbpath` volflag
|
390
394
|
* all volumes must exist / be available on startup; up2k (mtp especially) gets funky otherwise
|
391
395
|
* probably more, pls let me know
|
392
396
|
|
@@ -439,7 +443,8 @@ same order here too
|
|
439
443
|
* this is an msys2 bug, the regular windows edition of python is fine
|
440
444
|
|
441
445
|
* VirtualBox: sqlite throws `Disk I/O Error` when running in a VM and the up2k database is in a vboxsf
|
442
|
-
* use `--hist` or the `hist` volflag (`-v [...]:c,hist=/tmp/foo`) to place the db inside the vm instead
|
446
|
+
* use `--hist` or the `hist` volflag (`-v [...]:c,hist=/tmp/foo`) to place the db and thumbnails inside the vm instead
|
447
|
+
* or, if you only want to move the db (and not the thumbnails), then use `--dbpath` or the `dbpath` volflag
|
443
448
|
* also happens on mergerfs, so put the db elsewhere
|
444
449
|
|
445
450
|
* Ubuntu: dragging files from certain folders into firefox or chrome is impossible
|
@@ -861,6 +866,8 @@ if you are resuming a massive upload and want to skip hashing the files which al
|
|
861
866
|
|
862
867
|
if the server is behind a proxy which imposes a request-size limit, you can configure up2k to sneak below the limit with server-option `--u2sz` (the default is 96 MiB to support Cloudflare)
|
863
868
|
|
869
|
+
if you want to replace existing files on the server with new uploads by default, run with `--u2ow 2` (only works if users have the delete-permission, and can still be disabled with `🛡️` in the UI)
|
870
|
+
|
864
871
|
|
865
872
|
### file-search
|
866
873
|
|
@@ -1649,6 +1656,8 @@ copyparty creates a subfolder named `.hist` inside each volume where it stores t
|
|
1649
1656
|
this can instead be kept in a single place using the `--hist` argument, or the `hist=` volflag, or a mix of both:
|
1650
1657
|
* `--hist ~/.cache/copyparty -v ~/music::r:c,hist=-` sets `~/.cache/copyparty` as the default place to put volume info, but `~/music` gets the regular `.hist` subfolder (`-` restores default behavior)
|
1651
1658
|
|
1659
|
+
by default, the per-volume `up2k.db` sqlite3-database for `-e2d` and `-e2t` is stored next to the thumbnails according to the `--hist` option, but the global-option `--dbpath` and/or volflag `dbpath` can be used to put the database somewhere else
|
1660
|
+
|
1652
1661
|
note:
|
1653
1662
|
* putting the hist-folders on an SSD is strongly recommended for performance
|
1654
1663
|
* markdown edits are always stored in a local `.hist` subdirectory
|
@@ -2184,7 +2193,9 @@ buggy feature? rip it out by setting any of the following environment variables
|
|
2184
2193
|
|
2185
2194
|
| env-var | what it does |
|
2186
2195
|
| -------------------- | ------------ |
|
2196
|
+
| `PRTY_NO_DB_LOCK` | do not lock session/shares-databases for exclusive access |
|
2187
2197
|
| `PRTY_NO_IFADDR` | disable ip/nic discovery by poking into your OS with ctypes |
|
2198
|
+
| `PRTY_NO_IMPRESO` | do not try to load js/css files using `importlib.resources` |
|
2188
2199
|
| `PRTY_NO_IPV6` | disable some ipv6 support (should not be necessary since windows 2000) |
|
2189
2200
|
| `PRTY_NO_LZMA` | disable streaming xz compression of incoming uploads |
|
2190
2201
|
| `PRTY_NO_MP` | disable all use of the python `multiprocessing` module (actual multithreading, cpu-count for parsers/thumbnailers) |
|
@@ -2502,6 +2513,8 @@ below are some tweaks roughly ordered by usefulness:
|
|
2502
2513
|
* `--no-hash .` when indexing a network-disk if you don't care about the actual filehashes and only want the names/tags searchable
|
2503
2514
|
* if your volumes are on a network-disk such as NFS / SMB / s3, specifying larger values for `--iobuf` and/or `--s-rd-sz` and/or `--s-wr-sz` may help; try setting all of them to `524288` or `1048576` or `4194304`
|
2504
2515
|
* `--no-htp --hash-mt=0 --mtag-mt=1 --th-mt=1` minimizes the number of threads; can help in some eccentric environments (like the vscode debugger)
|
2516
|
+
* when running on AlpineLinux or other musl-based distro, try mimalloc for higher performance (and twice as much RAM usage); `apk add mimalloc2` and run copyparty with env-var `LD_PRELOAD=/usr/lib/libmimalloc-secure.so.2`
|
2517
|
+
* note that mimalloc requires special care when combined with prisonparty and/or bubbleparty/bubblewrap; you must give it access to `/proc` and `/sys` otherwise you'll encounter issues with FFmpeg (audio transcoding, thumbnails)
|
2505
2518
|
* `-j0` enables multiprocessing (actual multithreading), can reduce latency to `20+80/numCores` percent and generally improve performance in cpu-intensive workloads, for example:
|
2506
2519
|
* lots of connections (many users or heavy clients)
|
2507
2520
|
* simultaneous downloads and uploads saturating a 20gbps connection
|
@@ -100,7 +100,7 @@ turn almost any device into a file server with resumable uploads/downloads using
|
|
100
100
|
* [custom mimetypes](#custom-mimetypes) - change the association of a file extension
|
101
101
|
* [GDPR compliance](#GDPR-compliance) - imagine using copyparty professionally...
|
102
102
|
* [feature chickenbits](#feature-chickenbits) - buggy feature? rip it out
|
103
|
-
* [feature beefybits](#feature-beefybits) - force-enable
|
103
|
+
* [feature beefybits](#feature-beefybits) - force-enable features with known issues on your OS/env
|
104
104
|
* [packages](#packages) - the party might be closer than you think
|
105
105
|
* [arch package](#arch-package) - now [available on aur](https://aur.archlinux.org/packages/copyparty) maintained by [@icxes](https://github.com/icxes)
|
106
106
|
* [fedora package](#fedora-package) - does not exist yet
|
@@ -281,6 +281,8 @@ small collection of user feedback
|
|
281
281
|
|
282
282
|
`good enough`, `surprisingly correct`, `certified good software`, `just works`, `why`, `wow this is better than nextcloud`
|
283
283
|
|
284
|
+
* UI просто ужасно. Если буду описывать детально не смогу удержаться в рамках приличий
|
285
|
+
|
284
286
|
|
285
287
|
# motivations
|
286
288
|
|
@@ -329,7 +331,8 @@ roughly sorted by chance of encounter
|
|
329
331
|
* `--th-ff-jpg` may fix video thumbnails on some FFmpeg versions (macos, some linux)
|
330
332
|
* `--th-ff-swr` may fix audio thumbnails on some FFmpeg versions
|
331
333
|
* if the `up2k.db` (filesystem index) is on a samba-share or network disk, you'll get unpredictable behavior if the share is disconnected for a bit
|
332
|
-
* use `--hist` or the `hist` volflag (`-v [...]:c,hist=/tmp/foo`) to place the db on a local disk instead
|
334
|
+
* use `--hist` or the `hist` volflag (`-v [...]:c,hist=/tmp/foo`) to place the db and thumbnails on a local disk instead
|
335
|
+
* or, if you only want to move the db (and not the thumbnails), then use `--dbpath` or the `dbpath` volflag
|
333
336
|
* all volumes must exist / be available on startup; up2k (mtp especially) gets funky otherwise
|
334
337
|
* probably more, pls let me know
|
335
338
|
|
@@ -382,7 +385,8 @@ same order here too
|
|
382
385
|
* this is an msys2 bug, the regular windows edition of python is fine
|
383
386
|
|
384
387
|
* VirtualBox: sqlite throws `Disk I/O Error` when running in a VM and the up2k database is in a vboxsf
|
385
|
-
* use `--hist` or the `hist` volflag (`-v [...]:c,hist=/tmp/foo`) to place the db inside the vm instead
|
388
|
+
* use `--hist` or the `hist` volflag (`-v [...]:c,hist=/tmp/foo`) to place the db and thumbnails inside the vm instead
|
389
|
+
* or, if you only want to move the db (and not the thumbnails), then use `--dbpath` or the `dbpath` volflag
|
386
390
|
* also happens on mergerfs, so put the db elsewhere
|
387
391
|
|
388
392
|
* Ubuntu: dragging files from certain folders into firefox or chrome is impossible
|
@@ -804,6 +808,8 @@ if you are resuming a massive upload and want to skip hashing the files which al
|
|
804
808
|
|
805
809
|
if the server is behind a proxy which imposes a request-size limit, you can configure up2k to sneak below the limit with server-option `--u2sz` (the default is 96 MiB to support Cloudflare)
|
806
810
|
|
811
|
+
if you want to replace existing files on the server with new uploads by default, run with `--u2ow 2` (only works if users have the delete-permission, and can still be disabled with `🛡️` in the UI)
|
812
|
+
|
807
813
|
|
808
814
|
### file-search
|
809
815
|
|
@@ -1592,6 +1598,8 @@ copyparty creates a subfolder named `.hist` inside each volume where it stores t
|
|
1592
1598
|
this can instead be kept in a single place using the `--hist` argument, or the `hist=` volflag, or a mix of both:
|
1593
1599
|
* `--hist ~/.cache/copyparty -v ~/music::r:c,hist=-` sets `~/.cache/copyparty` as the default place to put volume info, but `~/music` gets the regular `.hist` subfolder (`-` restores default behavior)
|
1594
1600
|
|
1601
|
+
by default, the per-volume `up2k.db` sqlite3-database for `-e2d` and `-e2t` is stored next to the thumbnails according to the `--hist` option, but the global-option `--dbpath` and/or volflag `dbpath` can be used to put the database somewhere else
|
1602
|
+
|
1595
1603
|
note:
|
1596
1604
|
* putting the hist-folders on an SSD is strongly recommended for performance
|
1597
1605
|
* markdown edits are always stored in a local `.hist` subdirectory
|
@@ -2127,7 +2135,9 @@ buggy feature? rip it out by setting any of the following environment variables
|
|
2127
2135
|
|
2128
2136
|
| env-var | what it does |
|
2129
2137
|
| -------------------- | ------------ |
|
2138
|
+
| `PRTY_NO_DB_LOCK` | do not lock session/shares-databases for exclusive access |
|
2130
2139
|
| `PRTY_NO_IFADDR` | disable ip/nic discovery by poking into your OS with ctypes |
|
2140
|
+
| `PRTY_NO_IMPRESO` | do not try to load js/css files using `importlib.resources` |
|
2131
2141
|
| `PRTY_NO_IPV6` | disable some ipv6 support (should not be necessary since windows 2000) |
|
2132
2142
|
| `PRTY_NO_LZMA` | disable streaming xz compression of incoming uploads |
|
2133
2143
|
| `PRTY_NO_MP` | disable all use of the python `multiprocessing` module (actual multithreading, cpu-count for parsers/thumbnailers) |
|
@@ -2445,6 +2455,8 @@ below are some tweaks roughly ordered by usefulness:
|
|
2445
2455
|
* `--no-hash .` when indexing a network-disk if you don't care about the actual filehashes and only want the names/tags searchable
|
2446
2456
|
* if your volumes are on a network-disk such as NFS / SMB / s3, specifying larger values for `--iobuf` and/or `--s-rd-sz` and/or `--s-wr-sz` may help; try setting all of them to `524288` or `1048576` or `4194304`
|
2447
2457
|
* `--no-htp --hash-mt=0 --mtag-mt=1 --th-mt=1` minimizes the number of threads; can help in some eccentric environments (like the vscode debugger)
|
2458
|
+
* when running on AlpineLinux or other musl-based distro, try mimalloc for higher performance (and twice as much RAM usage); `apk add mimalloc2` and run copyparty with env-var `LD_PRELOAD=/usr/lib/libmimalloc-secure.so.2`
|
2459
|
+
* note that mimalloc requires special care when combined with prisonparty and/or bubbleparty/bubblewrap; you must give it access to `/proc` and `/sys` otherwise you'll encounter issues with FFmpeg (audio transcoding, thumbnails)
|
2448
2460
|
* `-j0` enables multiprocessing (actual multithreading), can reduce latency to `20+80/numCores` percent and generally improve performance in cpu-intensive workloads, for example:
|
2449
2461
|
* lots of connections (many users or heavy clients)
|
2450
2462
|
* simultaneous downloads and uploads saturating a 20gbps connection
|
@@ -40,6 +40,7 @@ from .cfg import flagcats, onedash
|
|
40
40
|
from .svchub import SvcHub
|
41
41
|
from .util import (
|
42
42
|
APPLESAN_TXT,
|
43
|
+
BAD_BOTS,
|
43
44
|
DEF_EXP,
|
44
45
|
DEF_MTE,
|
45
46
|
DEF_MTH,
|
@@ -221,7 +222,23 @@ def init_E(EE ) :
|
|
221
222
|
if E.mod.endswith("__init__"):
|
222
223
|
E.mod = os.path.dirname(E.mod)
|
223
224
|
|
224
|
-
|
225
|
+
try:
|
226
|
+
p = os.environ.get("XDG_CONFIG_HOME")
|
227
|
+
if not p:
|
228
|
+
raise Exception()
|
229
|
+
if p.startswith("~"):
|
230
|
+
p = os.path.expanduser(p)
|
231
|
+
p = os.path.abspath(os.path.realpath(p))
|
232
|
+
p = os.path.join(p, "copyparty")
|
233
|
+
if not os.path.isdir(p):
|
234
|
+
os.mkdir(p)
|
235
|
+
os.listdir(p)
|
236
|
+
except:
|
237
|
+
p = ""
|
238
|
+
|
239
|
+
if p:
|
240
|
+
E.cfg = p
|
241
|
+
elif sys.platform == "win32":
|
225
242
|
bdir = os.environ.get("APPDATA") or os.environ.get("TEMP") or "."
|
226
243
|
E.cfg = os.path.normpath(bdir + "/copyparty")
|
227
244
|
elif sys.platform == "darwin":
|
@@ -1002,7 +1019,7 @@ def add_upload(ap):
|
|
1002
1019
|
ap2.add_argument("--turbo", metavar="LVL", type=int, default=0, help="configure turbo-mode in up2k client; [\033[32m-1\033[0m] = forbidden/always-off, [\033[32m0\033[0m] = default-off and warn if enabled, [\033[32m1\033[0m] = default-off, [\033[32m2\033[0m] = on, [\033[32m3\033[0m] = on and disable datecheck")
|
1003
1020
|
ap2.add_argument("--u2j", metavar="JOBS", type=int, default=2, help="web-client: number of file chunks to upload in parallel; 1 or 2 is good for low-latency (same-country) connections, 4-8 for android clients, 16 for cross-atlantic (max=64)")
|
1004
1021
|
ap2.add_argument("--u2sz", metavar="N,N,N", type=u, default="1,64,96", help="web-client: default upload chunksize (MiB); sets \033[33mmin,default,max\033[0m in the settings gui. Each HTTP POST will aim for \033[33mdefault\033[0m, and never exceed \033[33mmax\033[0m. Cloudflare max is 96. Big values are good for cross-atlantic but may increase HDD fragmentation on some FS. Disable this optimization with [\033[32m1,1,1\033[0m]")
|
1005
|
-
ap2.add_argument("--u2ow", metavar="NUM", type=int, default=0, help="web-client: default setting for when to overwrite existing files; [\033[32m0\033[0m]=never, [\033[32m1\033[0m]=if-client-newer, [\033[32m2\033[0m]=always (volflag=u2ow)")
|
1022
|
+
ap2.add_argument("--u2ow", metavar="NUM", type=int, default=0, help="web-client: default setting for when to replace/overwrite existing files; [\033[32m0\033[0m]=never, [\033[32m1\033[0m]=if-client-newer, [\033[32m2\033[0m]=always (volflag=u2ow)")
|
1006
1023
|
ap2.add_argument("--u2sort", metavar="TXT", type=u, default="s", help="upload order; [\033[32ms\033[0m]=smallest-first, [\033[32mn\033[0m]=alphabetical, [\033[32mfs\033[0m]=force-s, [\033[32mfn\033[0m]=force-n -- alphabetical is a bit slower on fiber/LAN but makes it easier to eyeball if everything went fine")
|
1007
1024
|
ap2.add_argument("--write-uplog", action="store_true", help="write POST reports to textfiles in working-directory")
|
1008
1025
|
|
@@ -1021,6 +1038,8 @@ def add_network(ap):
|
|
1021
1038
|
ap2.add_argument("--reuseaddr", action="store_true", help="set reuseaddr on listening sockets on windows; allows rapid restart of copyparty at the expense of being able to accidentally start multiple instances")
|
1022
1039
|
else:
|
1023
1040
|
ap2.add_argument("--freebind", action="store_true", help="allow listening on IPs which do not yet exist, for example if the network interfaces haven't finished going up. Only makes sense for IPs other than '0.0.0.0', '127.0.0.1', '::', and '::1'. May require running as root (unless net.ipv6.ip_nonlocal_bind)")
|
1041
|
+
ap2.add_argument("--wr-h-eps", metavar="PATH", type=u, default="", help="write list of listening-on ip:port to textfile at \033[33mPATH\033[0m when http-servers have started")
|
1042
|
+
ap2.add_argument("--wr-h-aon", metavar="PATH", type=u, default="", help="write list of accessible-on ip:port to textfile at \033[33mPATH\033[0m when http-servers have started")
|
1024
1043
|
ap2.add_argument("--s-thead", metavar="SEC", type=int, default=120, help="socket timeout (read request header)")
|
1025
1044
|
ap2.add_argument("--s-tbody", metavar="SEC", type=float, default=128.0, help="socket timeout (read/write request/response bodies). Use 60 on fast servers (default is extremely safe). Disable with 0 if reverse-proxied for a 2%% speed boost")
|
1026
1045
|
ap2.add_argument("--s-rd-sz", metavar="B", type=int, default=256*1024, help="socket read size in bytes (indirectly affects filesystem writes; recommendation: keep equal-to or lower-than \033[33m--iobuf\033[0m)")
|
@@ -1214,6 +1233,7 @@ def add_yolo(ap):
|
|
1214
1233
|
ap2 = ap.add_argument_group('yolo options')
|
1215
1234
|
ap2.add_argument("--allow-csrf", action="store_true", help="disable csrf protections; let other domains/sites impersonate you through cross-site requests")
|
1216
1235
|
ap2.add_argument("--getmod", action="store_true", help="permit ?move=[...] and ?delete as GET")
|
1236
|
+
ap2.add_argument("--wo-up-readme", action="store_true", help="allow users with write-only access to upload logues and readmes without adding the _wo_ filename prefix (volflag=wo_up_readme)")
|
1217
1237
|
|
1218
1238
|
|
1219
1239
|
def add_optouts(ap):
|
@@ -1233,6 +1253,7 @@ def add_optouts(ap):
|
|
1233
1253
|
ap2.add_argument("--zipmaxt", metavar="TXT", type=u, default="", help="custom errormessage when download size exceeds max (volflag=zipmaxt)")
|
1234
1254
|
ap2.add_argument("--zipmaxu", action="store_true", help="authenticated users bypass the zip size limit (volflag=zipmaxu)")
|
1235
1255
|
ap2.add_argument("--zip-who", metavar="LVL", type=int, default=3, help="who can download as zip/tar? [\033[32m0\033[0m]=nobody, [\033[32m1\033[0m]=admins, [\033[32m2\033[0m]=authenticated-with-read-access, [\033[32m3\033[0m]=everyone-with-read-access (volflag=zip_who)\n\033[1;31mWARNING:\033[0m if a nested volume has a more restrictive value than a parent volume, then this will be \033[33mignored\033[0m if the download is initiated from the parent, more lenient volume")
|
1256
|
+
ap2.add_argument("--ua-nozip", metavar="PTN", type=u, default=BAD_BOTS, help="regex of user-agents to reject from download-as-zip/tar; disable with [\033[32mno\033[0m] or blank")
|
1236
1257
|
ap2.add_argument("--no-zip", action="store_true", help="disable download as zip/tar; same as \033[33m--zip-who=0\033[0m")
|
1237
1258
|
ap2.add_argument("--no-tarcmp", action="store_true", help="disable download as compressed tar (?tar=gz, ?tar=bz2, ?tar=xz, ?tar=gz:9, ...)")
|
1238
1259
|
ap2.add_argument("--no-lifetime", action="store_true", help="do not allow clients (or server config) to schedule an upload to be deleted after a given time")
|
@@ -1380,6 +1401,7 @@ def add_db_general(ap, hcores):
|
|
1380
1401
|
ap2.add_argument("-e2vu", action="store_true", help="on hash mismatch: update the database with the new hash")
|
1381
1402
|
ap2.add_argument("-e2vp", action="store_true", help="on hash mismatch: panic and quit copyparty")
|
1382
1403
|
ap2.add_argument("--hist", metavar="PATH", type=u, default="", help="where to store volume data (db, thumbs); default is a folder named \".hist\" inside each volume (volflag=hist)")
|
1404
|
+
ap2.add_argument("--dbpath", metavar="PATH", type=u, default="", help="override where the volume databases are to be placed; default is the same as \033[33m--hist\033[0m (volflag=dbpath)")
|
1383
1405
|
ap2.add_argument("--no-hash", metavar="PTN", type=u, default="", help="regex: disable hashing of matching absolute-filesystem-paths during e2ds folder scans (volflag=nohash)")
|
1384
1406
|
ap2.add_argument("--no-idx", metavar="PTN", type=u, default=noidx, help="regex: disable indexing of matching absolute-filesystem-paths during e2ds folder scans (volflag=noidx)")
|
1385
1407
|
ap2.add_argument("--no-dirsz", action="store_true", help="do not show total recursive size of folders in listings, show inode size instead; slightly faster (volflag=nodirsz)")
|
@@ -1418,11 +1440,13 @@ def add_db_metadata(ap):
|
|
1418
1440
|
|
1419
1441
|
def add_txt(ap):
|
1420
1442
|
ap2 = ap.add_argument_group('textfile options')
|
1443
|
+
ap2.add_argument("--md-hist", metavar="TXT", type=u, default="s", help="where to store old version of markdown files; [\033[32ms\033[0m]=subfolder, [\033[32mv\033[0m]=volume-histpath, [\033[32mn\033[0m]=nope/disabled (volflag=md_hist)")
|
1421
1444
|
ap2.add_argument("-mcr", metavar="SEC", type=int, default=60, help="the textfile editor will check for serverside changes every \033[33mSEC\033[0m seconds")
|
1422
1445
|
ap2.add_argument("-emp", action="store_true", help="enable markdown plugins -- neat but dangerous, big XSS risk")
|
1423
1446
|
ap2.add_argument("--exp", action="store_true", help="enable textfile expansion -- replace {{self.ip}} and such; see \033[33m--help-exp\033[0m (volflag=exp)")
|
1424
1447
|
ap2.add_argument("--exp-md", metavar="V,V,V", type=u, default=DEF_EXP, help="comma/space-separated list of placeholders to expand in markdown files; add/remove stuff on the default list with +hdr_foo or /vf.scan (volflag=exp_md)")
|
1425
1448
|
ap2.add_argument("--exp-lg", metavar="V,V,V", type=u, default=DEF_EXP, help="comma/space-separated list of placeholders to expand in prologue/epilogue files (volflag=exp_lg)")
|
1449
|
+
ap2.add_argument("--ua-nodoc", metavar="PTN", type=u, default=BAD_BOTS, help="regex of user-agents to reject from viewing documents through ?doc=[...]; disable with [\033[32mno\033[0m] or blank")
|
1426
1450
|
|
1427
1451
|
|
1428
1452
|
def add_og(ap):
|
@@ -353,6 +353,7 @@ class VFS(object):
|
|
353
353
|
self.badcfg1 = False
|
354
354
|
self.nodes = {} # child nodes
|
355
355
|
self.histtab = {} # all realpath->histpath
|
356
|
+
self.dbpaths = {} # all realpath->dbpath
|
356
357
|
self.dbv = None # closest full/non-jump parent
|
357
358
|
self.lim = None # upload limits; only set for dbv
|
358
359
|
self.shr_src = None # source vfs+rem of a share
|
@@ -374,12 +375,13 @@ class VFS(object):
|
|
374
375
|
rp = realpath + ("" if realpath.endswith(os.sep) else os.sep)
|
375
376
|
vp = vpath + ("/" if vpath else "")
|
376
377
|
self.histpath = os.path.join(realpath, ".hist") # db / thumbcache
|
378
|
+
self.dbpath = self.histpath
|
377
379
|
self.all_vols = {vpath: self} # flattened recursive
|
378
380
|
self.all_nodes = {vpath: self} # also jumpvols/shares
|
379
381
|
self.all_aps = [(rp, self)]
|
380
382
|
self.all_vps = [(vp, self)]
|
381
383
|
else:
|
382
|
-
self.histpath = ""
|
384
|
+
self.histpath = self.dbpath = ""
|
383
385
|
self.all_vols = {}
|
384
386
|
self.all_nodes = {}
|
385
387
|
self.all_aps = []
|
@@ -454,17 +456,23 @@ class VFS(object):
|
|
454
456
|
|
455
457
|
def _copy_flags(self, name ) :
|
456
458
|
flags = {k: v for k, v in self.flags.items()}
|
459
|
+
|
457
460
|
hist = flags.get("hist")
|
458
461
|
if hist and hist != "-":
|
459
462
|
zs = "{}/{}".format(hist.rstrip("/"), name)
|
460
463
|
flags["hist"] = os.path.expandvars(os.path.expanduser(zs))
|
461
464
|
|
465
|
+
dbp = flags.get("dbpath")
|
466
|
+
if dbp and dbp != "-":
|
467
|
+
zs = "{}/{}".format(dbp.rstrip("/"), name)
|
468
|
+
flags["dbpath"] = os.path.expandvars(os.path.expanduser(zs))
|
469
|
+
|
462
470
|
return flags
|
463
471
|
|
464
472
|
def bubble_flags(self) :
|
465
473
|
if self.dbv:
|
466
474
|
for k, v in self.dbv.flags.items():
|
467
|
-
if k not in
|
475
|
+
if k not in ("hist", "dbpath"):
|
468
476
|
self.flags[k] = v
|
469
477
|
|
470
478
|
for n in self.nodes.values():
|
@@ -1752,7 +1760,7 @@ class AuthSrv(object):
|
|
1752
1760
|
pass
|
1753
1761
|
elif vflag:
|
1754
1762
|
vflag = os.path.expandvars(os.path.expanduser(vflag))
|
1755
|
-
vol.histpath = uncyg(vflag) if WINDOWS else vflag
|
1763
|
+
vol.histpath = vol.dbpath = uncyg(vflag) if WINDOWS else vflag
|
1756
1764
|
elif self.args.hist:
|
1757
1765
|
for nch in range(len(hid)):
|
1758
1766
|
hpath = os.path.join(self.args.hist, hid[: nch + 1])
|
@@ -1773,12 +1781,45 @@ class AuthSrv(object):
|
|
1773
1781
|
with open(powner, "wb") as f:
|
1774
1782
|
f.write(me)
|
1775
1783
|
|
1776
|
-
vol.histpath = hpath
|
1784
|
+
vol.histpath = vol.dbpath = hpath
|
1777
1785
|
break
|
1778
1786
|
|
1779
1787
|
vol.histpath = absreal(vol.histpath)
|
1788
|
+
|
1789
|
+
for vol in vfs.all_vols.values():
|
1790
|
+
hid = self.hid_cache[vol.realpath]
|
1791
|
+
vflag = vol.flags.get("dbpath")
|
1792
|
+
if vflag == "-":
|
1793
|
+
pass
|
1794
|
+
elif vflag:
|
1795
|
+
vflag = os.path.expandvars(os.path.expanduser(vflag))
|
1796
|
+
vol.dbpath = uncyg(vflag) if WINDOWS else vflag
|
1797
|
+
elif self.args.dbpath:
|
1798
|
+
for nch in range(len(hid)):
|
1799
|
+
hpath = os.path.join(self.args.dbpath, hid[: nch + 1])
|
1800
|
+
bos.makedirs(hpath)
|
1801
|
+
|
1802
|
+
powner = os.path.join(hpath, "owner.txt")
|
1803
|
+
try:
|
1804
|
+
with open(powner, "rb") as f:
|
1805
|
+
owner = f.read().rstrip()
|
1806
|
+
except:
|
1807
|
+
owner = None
|
1808
|
+
|
1809
|
+
me = afsenc(vol.realpath).rstrip()
|
1810
|
+
if owner not in [None, me]:
|
1811
|
+
continue
|
1812
|
+
|
1813
|
+
if owner is None:
|
1814
|
+
with open(powner, "wb") as f:
|
1815
|
+
f.write(me)
|
1816
|
+
|
1817
|
+
vol.dbpath = hpath
|
1818
|
+
break
|
1819
|
+
|
1820
|
+
vol.dbpath = absreal(vol.dbpath)
|
1780
1821
|
if vol.dbv:
|
1781
|
-
if bos.path.exists(os.path.join(vol.
|
1822
|
+
if bos.path.exists(os.path.join(vol.dbpath, "up2k.db")):
|
1782
1823
|
promote.append(vol)
|
1783
1824
|
vol.dbv = None
|
1784
1825
|
else:
|
@@ -1793,9 +1834,7 @@ class AuthSrv(object):
|
|
1793
1834
|
"\n the following jump-volumes were generated to assist the vfs.\n As they contain a database (probably from v0.11.11 or older),\n they are promoted to full volumes:"
|
1794
1835
|
]
|
1795
1836
|
for vol in promote:
|
1796
|
-
ta.append(
|
1797
|
-
" /{} ({}) ({})".format(vol.vpath, vol.realpath, vol.histpath)
|
1798
|
-
)
|
1837
|
+
ta.append(" /%s (%s) (%s)" % (vol.vpath, vol.realpath, vol.dbpath))
|
1799
1838
|
|
1800
1839
|
self.log("\n\n".join(ta) + "\n", c=3)
|
1801
1840
|
|
@@ -1806,13 +1845,27 @@ class AuthSrv(object):
|
|
1806
1845
|
is_shr = shr and zv.vpath.split("/")[0] == shr
|
1807
1846
|
if histp and not is_shr and histp in rhisttab:
|
1808
1847
|
zv2 = rhisttab[histp]
|
1809
|
-
t = "invalid config; multiple volumes share the same histpath (database location):\n histpath: %s\n volume 1: /%s [%s]\n volume 2: %s [%s]"
|
1848
|
+
t = "invalid config; multiple volumes share the same histpath (database+thumbnails location):\n histpath: %s\n volume 1: /%s [%s]\n volume 2: %s [%s]"
|
1810
1849
|
t = t % (histp, zv2.vpath, zv2.realpath, zv.vpath, zv.realpath)
|
1811
1850
|
self.log(t, 1)
|
1812
1851
|
raise Exception(t)
|
1813
1852
|
rhisttab[histp] = zv
|
1814
1853
|
vfs.histtab[zv.realpath] = histp
|
1815
1854
|
|
1855
|
+
rdbpaths = {}
|
1856
|
+
vfs.dbpaths = {}
|
1857
|
+
for zv in vfs.all_vols.values():
|
1858
|
+
dbp = zv.dbpath
|
1859
|
+
is_shr = shr and zv.vpath.split("/")[0] == shr
|
1860
|
+
if dbp and not is_shr and dbp in rdbpaths:
|
1861
|
+
zv2 = rdbpaths[dbp]
|
1862
|
+
t = "invalid config; multiple volumes share the same dbpath (database location):\n dbpath: %s\n volume 1: /%s [%s]\n volume 2: %s [%s]"
|
1863
|
+
t = t % (dbp, zv2.vpath, zv2.realpath, zv.vpath, zv.realpath)
|
1864
|
+
self.log(t, 1)
|
1865
|
+
raise Exception(t)
|
1866
|
+
rdbpaths[dbp] = zv
|
1867
|
+
vfs.dbpaths[zv.realpath] = dbp
|
1868
|
+
|
1816
1869
|
for vol in vfs.all_vols.values():
|
1817
1870
|
use = False
|
1818
1871
|
for k in ["zipmaxn", "zipmaxs"]:
|
@@ -52,6 +52,7 @@ def vf_bmap() :
|
|
52
52
|
"og_s_title",
|
53
53
|
"rand",
|
54
54
|
"rss",
|
55
|
+
"wo_up_readme",
|
55
56
|
"xdev",
|
56
57
|
"xlink",
|
57
58
|
"xvol",
|
@@ -82,6 +83,7 @@ def vf_vmap() :
|
|
82
83
|
"md_sbf",
|
83
84
|
"lg_sba",
|
84
85
|
"md_sba",
|
86
|
+
"md_hist",
|
85
87
|
"nrand",
|
86
88
|
"u2ow",
|
87
89
|
"og_desc",
|
@@ -173,6 +175,7 @@ flagcats = {
|
|
173
175
|
"vmaxb=1g": "total volume size max 1 GiB (suffixes: b, k, m, g, t)",
|
174
176
|
"vmaxn=4k": "max 4096 files in volume (suffixes: b, k, m, g, t)",
|
175
177
|
"medialinks": "return medialinks for non-up2k uploads (not hotlinks)",
|
178
|
+
"wo_up_readme": "write-only users can upload logues without getting renamed",
|
176
179
|
"rand": "force randomized filenames, 9 chars long by default",
|
177
180
|
"nrand=N": "randomized filenames are N chars long",
|
178
181
|
"u2ow=N": "overwrite existing files? 0=no 1=if-older 2=always",
|
@@ -202,6 +205,7 @@ flagcats = {
|
|
202
205
|
"d2v": "disables file verification, overrides -e2v*",
|
203
206
|
"d2d": "disables all database stuff, overrides -e2*",
|
204
207
|
"hist=/tmp/cdb": "puts thumbnails and indexes at that location",
|
208
|
+
"dbpath=/tmp/cdb": "puts indexes at that location",
|
205
209
|
"scan=60": "scan for new files every 60sec, same as --re-maxage",
|
206
210
|
"nohash=\\.iso$": "skips hashing file contents if path matches *.iso",
|
207
211
|
"noidx=\\.iso$": "fully ignores the contents at paths matching *.iso",
|
@@ -289,6 +293,7 @@ flagcats = {
|
|
289
293
|
"og_ua": "if defined: only send OG html if useragent matches this regex",
|
290
294
|
},
|
291
295
|
"textfiles": {
|
296
|
+
"md_hist": "where to put markdown backups; s=subfolder, v=volHist, n=nope",
|
292
297
|
"exp": "enable textfile expansion; see --help-exp",
|
293
298
|
"exp_md": "placeholders to expand in markdown files; see --help",
|
294
299
|
"exp_lg": "placeholders to expand in prologue/epilogue; see --help",
|
@@ -19,6 +19,7 @@ from .__init__ import PY2, TYPE_CHECKING
|
|
19
19
|
from .authsrv import VFS
|
20
20
|
from .bos import bos
|
21
21
|
from .util import (
|
22
|
+
FN_EMB,
|
22
23
|
VF_CAREFUL,
|
23
24
|
Daemon,
|
24
25
|
ODict,
|
@@ -166,6 +167,16 @@ class FtpFs(AbstractedFS):
|
|
166
167
|
fn = sanitize_fn(fn or "", "")
|
167
168
|
vpath = vjoin(rd, fn)
|
168
169
|
vfs, rem = self.hub.asrv.vfs.get(vpath, self.uname, r, w, m, d)
|
170
|
+
if (
|
171
|
+
w
|
172
|
+
and fn.lower() in FN_EMB
|
173
|
+
and self.h.uname not in vfs.axs.uread
|
174
|
+
and "wo_up_readme" not in vfs.flags
|
175
|
+
):
|
176
|
+
fn = "_wo_" + fn
|
177
|
+
vpath = vjoin(rd, fn)
|
178
|
+
vfs, rem = self.hub.asrv.vfs.get(vpath, self.uname, r, w, m, d)
|
179
|
+
|
169
180
|
if not vfs.realpath:
|
170
181
|
t = "No filesystem mounted at [{}]"
|
171
182
|
raise FSE(t.format(vpath))
|