From fac4b085268fa3042122ea5320a1ff3fed7bf212 Mon Sep 17 00:00:00 2001 From: ed Date: Wed, 7 Sep 2022 23:03:48 +0200 Subject: [PATCH] firefox may forget FDs during upload; warn about it --- README.md | 3 +++ copyparty/web/browser.js | 2 ++ copyparty/web/up2k.js | 7 ++++++- copyparty/web/util.js | 1 + 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 43c0e1a3..f0bf7976 100644 --- a/README.md +++ b/README.md @@ -278,6 +278,9 @@ some improvement ideas * VirtualBox: sqlite throws `Disk I/O Error` when running in a VM and the up2k database is in a vboxsf * use `--hist` or the `hist` volflag (`-v [...]:c,hist=/tmp/foo`) to place the db inside the vm instead +* Ubuntu: dragging files from certain folders into firefox or chrome is impossible + * due to snap security policies -- see `snap connections firefox` for the allowlist, `removable-media` permits all of `/mnt` and `/media` apparently + # FAQ diff --git a/copyparty/web/browser.js b/copyparty/web/browser.js index a7b0ed6a..5d9d19b9 100644 --- a/copyparty/web/browser.js +++ b/copyparty/web/browser.js @@ -304,6 +304,7 @@ var Ls = { "u_badf": 'These {0} files (of {1} total) were skipped, possibly due to filesystem permissions:\n\n', "u_blankf": 'These {0} files (of {1} total) are blank / empty; upload them anyways?\n\n', "u_just1": '\nMaybe it works better if you select just one file', + "u_ff_many": "This amount of files may cause Firefox to skip some files, or crash.\nPlease try again with fewer files (or use Chrome) if that happens.\n\n", "u_asku": 'upload these {0} files to {1}', "u_unpt": "you can undo / delete this upload using the top-left 🧯", "u_etadone": 'Done ({0}, {1} files)', @@ -646,6 +647,7 @@ var Ls = { "u_badf": 'Disse {0} filene (av totalt {1}) kan ikke leses, kanskje pga rettighetsproblemer i filsystemet på datamaskinen din:\n\n', "u_blankf": 'Disse {0} filene (av totalt {1}) er blanke / uten innhold; ønsker du å laste dem opp uansett?\n\n', "u_just1": '\nFunker kanskje bedre hvis du bare tar én fil om gangen', + "u_ff_many": "Det var mange filer! Mulig at Firefox kommer til å krasje, eller\nhoppe over et par av dem. Smart å ha Chrome på lur i tilfelle.\n\n", "u_asku": 'Laste opp disse {0} filene til {1}', "u_unpt": "Du kan angre / slette opplastningen med 🧯 oppe til venstre", "u_etadone": 'Ferdig ({0}, {1} filer)', diff --git a/copyparty/web/up2k.js b/copyparty/web/up2k.js index c4eadda7..154e870f 100644 --- a/copyparty/web/up2k.js +++ b/copyparty/web/up2k.js @@ -1177,7 +1177,12 @@ function up2k_init(subtle) { return a < b ? -1 : a > b ? 1 : 0; }); - var msg = [L.u_asku.format(good_files.length, esc(get_vpath())) + '