Commit graph

485 commits

Author SHA1 Message Date
AppleTheGolden 425060b552
wip: allow any thumbable file to be the folder thumbnail
also refactor thumbnail generation
2025-11-14 21:49:58 +01:00
ed f55d8341f1 new flag nodupem: reject dupes on move; closes #742 2025-10-14 22:51:48 +00:00
ed 6c024dbf80 xm-hooks: list of selected files; closes #921
previously, `xm` hooks would be called with the `txt` property
containing the url-decoded message

now, a new property `body` contains the original unmodified message,
to avoid any ambiguity caused by url-decoding

if any files are selected, the list of files is appended to
the `txt` field as lines, and as `sel` url-parameters in `body`

Co-authored-by: Carson Coder <carson@carsoncoder.com>
2025-10-14 19:39:03 +00:00
ed f2caab6119 dedup: explicit reflink/ficlone on python<3.14 2025-10-11 23:43:09 +00:00
ed eb173be4f1 folder-thumbs: cbz, epub 2025-10-04 11:57:43 +00:00
ed fc2754cba5 option to delete .PARTIAL on expiration 2025-09-29 22:16:57 +00:00
ed 435db14798 pregen html_head when static 2025-09-29 21:47:53 +00:00
ed 1193f9ba6c stop binary garbage from hitting logs 2025-09-28 19:29:18 +00:00
ed df0fa9d1b7 xbu/xau with custom message 2025-09-26 23:49:32 +00:00
ed 6912e86747 loud warning on EIO (HDD/FS trouble) (#851) 2025-09-25 23:18:09 +00:00
ed b136a5b042 fast_confirm_chunks: release all on error;
possibly fixes an issue someone has been runnning into:

an upload could get stuck on "that chunk is already being written to"
when the server was overloaded enough that connections kept dropping
2025-09-23 19:11:41 +00:00
ed 538a205ce4 fix up2k fstab after 59a01221 2025-09-19 21:50:21 +00:00
ed 478f1c764e logging: limit/disable fs-indexing progress 2025-09-19 21:05:42 +00:00
ed 59a0122179 prevent upload into ramdisk;
tries to detect misconfigured docker environments, e.g. /w/foo is mapped
to a disk but /w/ itself isn't
2025-09-19 19:46:14 +00:00
ed 8b66874b85 be case-sensitive on windows/macos (closes #781);
on Windows and Macos, most filesystems are case-insensitive,
which can lead to dangerous situations

one example is when another program (not copyparty or its UI) wants to
rename a file from `Foo` to `foo`; the program will probably start by
checking if `foo` exists and then delete it, however this would match
`Foo` and confuse the program into deleting the wrong file

fix this by adding a VERY EXPENSIVE detector to prevent this,
by listing the parent folder and checking if the case matches

this check will auto-enable when a case-insensitive FS is detected on
startup, but option `casechk` (global or volflag) can override this
2025-09-14 23:39:46 +00:00
ed e09f3c9e2c shutil: ignore errors from copystat in copy2;
ntfs on linux can be picky about cloning mtime onto a new file;
generally we don't care if that fails, however, we also want the
speedup that CopyFile2 can offer, so cannot use copyfile directly

this avoids the following issue:

up2k:3537 <_symlink>: shutil.copy2(fsenc(csrc), fsenc(dst))
shutil:437 <copy2>: copystat(src, dst, follow_symlinks=follow_sym[...]
shutil:376 <copystat>: lookup("utime")(dst, ns=(st.st_atime_ns, s[...]
[PermissionError] [Errno 1] Operation not permitted, '/windows/videos'
2025-09-08 20:21:12 +00:00
ed 96b109b0d6 decrement folder-sz on delete; closes #759, #393 2025-09-05 21:03:30 +00:00
ed 74821a38ad speed 2025-09-05 20:38:04 +00:00
ed eeb7738b53 clamp utime to filesystem limits (#539) 2025-09-04 23:31:05 +00:00
ed aa1c921302 support file-as-volume (#696);
a volume can be a single file instead of a folder,
but a misleading warning indicated otherwise
2025-08-27 19:17:36 +00:00
ed 0b50fde305 audio-thumb as folder-thumb; closes #691 2025-08-27 18:03:10 +00:00
ed 4df033ecc3 [DB-V6]: store usernames; closes #530 2025-08-15 21:33:13 +00:00
ed a4649d1e71 generic header auth (closes #504);
extends idp-auth to also accept a collection of headers (and
expected values of those headers) and map those to certain users

useful for Tailscale-User-Login and similar
2025-08-15 19:19:21 +00:00
ed 715d374ee4 button to abort copy/move; closes #572 2025-08-12 21:46:42 +00:00
ed 1b71294aab close #387 2025-08-07 20:30:09 +00:00
ed 16bbcce51b videos can be folder thumbnails; closes #459 2025-08-03 22:10:33 +00:00
ed ca22cd8853 v1.18.9 2025-08-01 20:56:27 +00:00
ed 6d6d79fcbc fix upload-abort in shares; closes #347 2025-08-01 15:08:55 +00:00
ed 3222ba3acd man 2025-07-31 22:56:45 +00:00
ed f195998865 per-volume uid/gid; closes #265 2025-07-30 19:35:00 +00:00
ed df9feabcf8 add reflink-based dedup; closes #201 2025-07-28 19:46:15 +00:00
ed edba7fffd3 add landmarks (#182) 2025-07-25 18:35:28 +00:00
ed 9921c43e3a add options to set default chmod (#181)
the unix-permissions of new files/folders can now be changed

* global-option --chmod-f, volflag chmod_f for files
* global-option --chmod-d, volflag chmod_d for directories

the expected value is a standard three-digit octal value
(User/Group/Other) such as 755, 750, 644, 640, etc
2025-07-21 22:46:28 +00:00
ed 0a9a807772 fix xbu/xau reloc collision-handling;
if a hook relocates a file into a folder where that same file
exists with the same filename, the filename-collision-avoidance
would kick in, generating a new filename and another copy
2025-05-14 15:45:52 +02:00
ed 41fa6b2552 improve tagscan-resume for dupes;
* ignore t:mtp (the todo-flag) when spooling the resume-list
* only add a single t:mtp for each unique file
2025-05-14 12:32:30 +02:00
ed 5dcd88a6c8 add option --put-name; closes #164 2025-05-12 10:30:41 +02:00
ed e1b9ac631f separate histpath and dbpath options (#149)
the up2k databases are, by default, stored in a `.hist` subfolder
inside each volume, next to thumbnails and transcoded audio

add a new option for storing the databases in a separate location,
making it possible to tune the underlying filesystem for optimal
performance characteristics

the `--hist` global-option and `hist` volflag still behave like
before, but `--dbpath` and volflag `dbpath` will override the
histpath for the up2k-db and up2k-snap exclusivey
2025-03-30 16:08:28 +00:00
ed 3c90cec0cd forgot these
pyinstaller/build.sh: fix jinja2 after upgrade

up2k.py: fix double-hs after dupe finalize
2025-03-23 20:19:18 +00:00
ed 57a56073d8 use zlib-ng when available
download-as-tar-gz becomes 2.4x faster in docker

segfaults on windows, so don't use it there

does not affect fedora or gentoo,
since zlib-ng is already system-default on those

also adds a global-option to write list of successful
binds to a textfile, for automation / smoketest purposes
2025-03-23 20:15:21 +00:00
ed 2525d594c5 19a5985f removed the restriction on uploading logues, as it was
too restrictive, blocking editing through webdav and ftp

but since logues and readmes can be used as helptext for users
with write-only access, it makes sense to block logue/readme
uploads from write-only users

users with write-only access can still upload any file as before,
but the filename prefix `_wo_` is added onto files named either
README.md | PREADME.md | .prologue.html | .epilogue.html

the new option `--wo-up-readme` restores previous behavior, and
will not add the filename-prefix for readmes/logues
2025-03-22 14:21:35 +00:00
ed 0a33336dd4 cosmetic: fix zipmax in up2k volume-listing 2025-03-16 17:51:50 +00:00
ed 5ab09769e1 move symlinks as-is; don't expand into full files
previously, when moving or renaming a symlink to a file (or
a folder with symlinks inside), the dedup setting would decide
whether those links would be expanded into full files or not

with dedup disabled (which is the default),
all symlinks would be expanded during a move operation

now, the dedup-setting is ignored when files/folders are moved,
but it still applies when uploading or copying files/folders

* absolute symlinks are moved as-is

* relative symlinks are rewritten as necessary,
   assuming both source and destination is known in db
2025-03-15 23:54:32 +00:00
ed 494179bd1c optional max-size for download-as-zip/tar 2025-03-14 23:36:01 +00:00
ed 5e12abbb9b ignore impossible lastmod on upload; closes #142
android-chrome bug https://issues.chromium.org/issues/393149335
sends last-modified time `-11644473600` for all uploads

this has been fixed in chromium, but there might be similar
bugs in other browsers, so add server-side and client-side
detection for unreasonable lastmod times

previously, if the js detected a similar situation, it would
substitute the lastmod-time with the client's wallclock, but
now the server's wallclock is always preferrred as fallback
2025-02-28 17:48:14 +00:00
ed e9f78ea70c up2k: tristate option for overwriting files; closes #139
adds a third possible value for the `replace` property in handshakes:

* absent or False: never overwrite an existing file on the server,
   and instead generate a new filename to avoid collision

* True: always overwrite existing files on the server

* "mt": only overwrite if client's last-modified is more recent
   (this is the new option)

the new UI button toggles between all three options,
defaulting to never-overwrite
2025-02-19 21:58:56 +00:00
ed 4be0d426f4 option to forget uploader-IP from db after some time
does this mean copyparty is GDPR-compliant now? idklol
2025-02-17 23:47:59 +00:00
ed b190e676b4 fix cosmetic volflag stuff:
* `xz` would show the "unrecognized volflag" warning,
   but it still applied correctly

* removing volflags with `-foo` would also show the warning
   but it would still get removed correctly

* hide `ext_th_d` in the startup volume-listing
2025-02-14 20:54:13 +00:00
ed 7a55833bb2 silence linter 2025-02-13 18:34:41 +00:00
ed c4cbc32cc5 v1.16.9 2025-01-22 23:26:17 +00:00
ed 917380ddbb add nosparse volflag + update s3 readme:
may improve upload performance in some particular uncommon scenarios,
for example if hdd-writes are uncached, and/or the hdd is drastically
slower than the network throughput

one particular usecase where nosparse *might* improve performance
is when the upload destination is cloud-storage provided by FUSE
(for example an s3 bucket) but this is educated guesswork
2025-01-19 16:28:40 +00:00