ThetaPilla. cca773f07b feat(fs): add pipelined multipart upload (#2723)
* feat(multipart): add chunk reassembly window

- Reassemble concurrently uploaded chunks into a sequential stream through a ring file, bounding disk usage to slots*chunkSize per session
- Park writers up to a deadline when their slot is busy instead of rejecting instantly, so flow control does not surface as connection errors in browsers
- Record a per-chunk CRC32 table for re-fill verification and keep it readable after close
- Propagate cancellation to blocked readers via CloseWithError so drivers treat aborts like canceled requests
- Cover ordering, backpressure, idempotent resends and close/abort wake-ups with race-enabled tests

* feat(multipart): add pipelined upload session manager

- Start the driver upload at session init over a sequential stream backed by the window, so client-to-server and server-to-storage transfers run concurrently
- Attach client-provided hashes to the stream so drivers can attempt rapid upload before any chunk arrives, and absorb chunks racing pipeline completion idempotently
- Keep only metadata and chunk CRCs after a failed attempt: re-sending chunk 0 re-fills a fresh window, and content changes between attempts are rejected
- Resume receiving sessions only when client hashes prove the same file; failed_retriable sessions resume unconditionally
- Reclaim sessions with a sliding-TTL GC and sweep orphaned ring files at startup
- Cover the state machine with race-enabled tests over a stubbed storage layer

* feat(setting): add multipart upload settings

- Add multipart_enabled and multipart_chunk_size (MB) as public traffic settings
- Validate the chunk size on save (integer within 1-90) via the setting item hook

* feat(server): add multipart upload API

- Add /api/fs/multipart init/chunk/complete/status/abort endpoints with headers aligned with /fs/put
- Gate init behind the FsUp permission checks and reuse the client upload rate limiter for chunk uploads
- Drain the request body before answering chunk requests on every path, so browsers do not see early responses as network errors
- Start the multipart session GC when the router is initialized to reclaim ring files orphaned by a previous run

* refactor(multipart): remove unused overwrite session field

- The overwrite flag was stored on the session but never read: the handler
  performs the pre-check and op.Put owns the overwrite semantics

* feat(setting): allow any positive multipart chunk size

- Validate the setting as a positive integer only; self-hosted admins decide
  the ceiling themselves instead of an arbitrary 90MB cap
- Keep clamping the client-suggested X-Chunk-Size to the admin value: the
  server buffers a window of 8 chunks per session, so an unbounded client
  suggestion would translate directly into server-side disk usage

* refactor(server): simplify multipart chunk size clamp

- Fold the two-step clamp into one branch: the ceiling is already floored,
  so a client suggestion just lowers the size with a 1MB floor
2026-08-06 14:14:35 +08:00
2026-07-28 13:18:34 +08:00
2024-02-03 19:44:50 +08:00
2024-03-25 22:53:44 +08:00
2026-07-28 07:37:07 +08:00
2022-04-18 18:31:10 +08:00

logo

OpenList is a resilient, long-term governance, community-driven fork of AList — built to defend open source against trust-based attacks.

latest version License Build status latest version

discussions Downloads


Disclaimer

OpenList is an open-source project independently maintained by the OpenList Team, following the AGPL-3.0 license and committed to maintaining complete code openness and modification transparency.

We have noticed the emergence of some third-party projects in the community with names similar to this project, such as OpenListApp/OpenListApp, as well as some paid proprietary software using the same or similar naming. To avoid user confusion, we hereby declare:

  • OpenList has no official association with any third-party derivative projects.

  • All software, code, and services of this project are maintained by the OpenList Team and are freely available on GitHub.

  • Project documentation and API services primarily rely on charitable resources provided by Cloudflare. There are currently no paid plans or commercial deployments, and the use of existing features does not involve any costs.

We respect the community's rights to free use and derivative development, but we also strongly urge downstream projects:

  • Should not use the "OpenList" name for impersonation promotion or commercial gain;

  • Must not distribute OpenList-based code in a closed-source manner or violate AGPL license terms.

To better maintain healthy ecosystem development, we recommend:

  • Clearly indicate the project source and choose appropriate open-source licenses in accordance with the open-source spirit;

  • If involving commercial use, please avoid using "OpenList" or any confusing naming as the project name;

  • If you need to use materials located under OpenListTeam/Logo, you may modify and use them under compliance with the agreement.

Thank you for your support and understanding of the OpenList project.

Features

Document

Demo

Discussion

Please refer to Discussions for raising general questions, Issues is for bug reports and feature requests only.

Sponsor

VPS.Town

Donors

Thanks to the following donors for their generous support:

  • HisAtri
  • 爱发电用户_7jTh
  • suka

License

The OpenList is open-source software licensed under the AGPL-3.0 license.

Disclaimer

  • This project is a free and open-source software designed to facilitate file sharing via net disks, primarily intended to support the downloading and learning of the Go programming language.
  • Please comply with all applicable laws and regulations when using this software. Any form of misuse is strictly prohibited.
  • The software is based on official SDKs or APIs without any modification, disruption, or interference with their behavior.
  • It only performs HTTP 302 redirects or traffic forwarding, and does not intercept, store, or tamper with any user data.
  • This project is not affiliated with any official platform or service provider.
  • The software is provided "as is", without any warranties of any kind, either express or implied, including but not limited to warranties of merchantability or fitness for a particular purpose.
  • The maintainers are not liable for any direct or indirect damages arising from the use of, or inability to use, this software.
  • You are solely responsible for any risks associated with using this software, including but not limited to account bans or download speed limitations.
  • This project is licensed under the AGPL-3.0 License. Please see the LICENSE file for details.

Contact Us

Contributors

We sincerely thank the author Xhofe of the original project AlistGo/alist and all other contributors.

Thanks goes to these wonderful people:

Contributors

S
Description
A new AList Fork to Anti Trust Crisis
Readme AGPL-3.0 79 MiB
Languages
Go 99.2%
Shell 0.7%