filebrowser/frontend
Henrique Dias 0b925cbca9
fix: unblock stalled and frozen uploads
A TUS PATCH rejected before its body was read left the client still streaming
a chunk. net/http gives up draining an unread request body after 256KiB and
then closes the connection, so the status we replied with was lost and the
browser saw a bare transport error instead. The client could not tell a
conflict from a network fault, retried blindly, and the upload stalled after
the first chunk — while curl, which reads the response as it writes, still
reported the status and appeared to work. Drain what is left of a rejected
chunk so the answer arrives on a connection that stays usable. The explicit
r.Body.Close() had to go with it: it ran before the drain, and the server
closes the request body itself once the handler returns.

Pressing Upload awaited a recursive listing of the whole destination subtree
before a single byte was sent, with no sign that anything was happening. On a
large destination that reads as a dead button, and the walk kept running after
the client gave up, then reported the failed write as a 500. A flat upload can
only collide with a direct child of the destination, so walk recursively only
for folder uploads, stop the walk once the request is done, and show the action
as busy while the destination is checked.

Along the way: a failed upload was credited as fully sent, so the progress bar
reported 100% when nothing had been written; the progress timer was recreated
without clearing the previous one; and the chunk size field threw on a value
with no unit and raced its own debounce on submit, so it appeared to refuse
every change.

Fixes #6006
Refs #5987
2026-07-27 16:28:17 +02:00
..
dist refactor: migrate frontend tooling to vite 4 (#2645) 2023-08-26 13:55:51 +02:00
public fix: accessibility and security improvements (#6033) 2026-07-25 07:30:02 +02:00
src fix: unblock stalled and frozen uploads 2026-07-27 16:28:17 +02:00
test-results chore: remove unused tests 2025-11-13 14:21:11 +01:00
.prettierignore refactor: Fix eslint warnings (#3698) 2025-01-30 10:18:48 +01:00
.prettierrc.json refactor: migrate frontend tooling to vite 4 (#2645) 2023-08-26 13:55:51 +02:00
assets.go chore: update minor and patch dependencies, go 1.25 2025-11-12 15:12:28 +01:00
env.d.ts build: update to node 22 and pnpm (#3616) 2024-12-09 12:27:18 +01:00
eslint.config.js chore: update minor dependencies (#5295) 2025-07-15 20:02:06 +02:00
index.html feat: configurable logout page URL for proxy/hook auth (#3884) 2025-11-30 08:44:34 +01:00
package.json Revert "chore(deps): update all non-major dependencies (#5946)" 2026-07-26 08:00:07 +02:00
pnpm-lock.yaml chore(deps): update dependency postcss to v8.5.18 [security] (#6047) 2026-07-27 07:47:17 +02:00
postcss.config.cjs refactor: migrate frontend tooling to vite 4 (#2645) 2023-08-26 13:55:51 +02:00
tsconfig.app.json chore: bump @vue/tsconfig 2025-11-13 14:21:30 +01:00
tsconfig.json build: update to node 22 and pnpm (#3616) 2024-12-09 12:27:18 +01:00
tsconfig.node.json chore: remove unused tests 2025-11-13 14:21:11 +01:00
vite.config.ts fix(frontend): do not delete original assets 2026-03-06 16:07:08 +01:00