Commit graph

16 commits

Author SHA1 Message Date
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
Henrique Dias
e6d70cf24c
fix(http): canonicalize paths before checking access rules (#6045) 2026-07-26 10:00:18 +02:00
Henrique Dias
fc80f4f44c
fix: base url/reverse proxy redirect 2026-03-14 09:30:35 +01:00
Henrique Dias
f029c3005e
refactor: cleanup package names (#5605) 2025-12-06 10:52:11 +01:00
jagadam97
d00b3ea8f8 fix(img):Prevent thumbnail generation for large images 2025-11-01 08:37:50 +01:00
Andreas Deininger
d729701bd4
chore: fix typos (#3490) 2024-09-23 11:55:07 +02:00
Tobias Goerke
7b35815754
feat: integrate tus.io for resumable and chunked uploads (#2145) 2023-07-28 18:15:44 +02:00
Ramires Viana
c63cc5a2d2 fix: file caching directive 2021-08-20 14:43:06 +02:00
Ramires Viana
190cb99a79 feat: browser cache directives 2021-04-19 12:49:40 +00:00
Ramires Viana
93a35ad251 fix: prefix handling on http router 2021-03-17 17:54:25 +00:00
Oleg Lobanov
019ce80fc5
fix: don't allow to remove root user 2021-01-11 22:33:36 +01:00
Oleg Lobanov
28672c0114
fix(security): check user permission to rename files 2020-06-06 17:45:51 +02:00
Oleg Lobanov
700f32718e
refactor: add more go linters (#970) 2020-06-01 01:12:36 +02:00
Oleg Lobanov
ba47e3b2fe
fix: fix static assets url generation (#965) 2020-05-31 22:26:10 +02:00
Henrique Dias
72e74d421c fix: don't return 404 if the prefix doesn't exist
License: MIT
Signed-off-by: Henrique Dias <hacdias@gmail.com>
2019-05-12 09:04:09 +01:00
Henrique Dias
12b2c21522 feat: v2 (#599)
Read https://github.com/filebrowser/filebrowser/pull/575.

Former-commit-id: 7aedcaaf72b863033e3f089d6df308d41a3fd00c [formerly bdbe4d49161b901c4adf9c245895a1be2d62e4a7] [formerly acfc1ec67c423e0b3e065a8c1f8897c5249af65b [formerly d309066def]]
Former-commit-id: 0c7d925a38a68ccabdf2c4bbd8c302ee89b93509 [formerly a6173925a1382955d93b334ded93f70d6dddd694]
Former-commit-id: e032e0804dd051df86f42962de2b39caec5318b7
2019-01-05 22:44:33 +00:00