Skip to content

Proposal: Default to Resumable Download Endpoint #31

@black-backdoor

Description

@black-backdoor

Hi,
I saw that over on the LocalSend GitHub repository some protocol version 3 stuff is being uploaded. I haven’t looked at it in detail yet, but here are some changes I propose:

Download Endpoint
I propose changing the default behavior from upload to download instead.

Endpoint

GET /api/localsend/v3/download/{session_id}/{file_id}/
Authorization: Bearer <token>

Problems with POST-based uploads:

  • Large requests can trigger server or proxy timeouts.
  • Some servers buffer the whole body in memory -> Out-Of-Memory risk
  • Resuming uploads is hard without a resumable protocol.

Benefits:

  • Native Range/Content-Range support -> easy resumable downloads.
  • Client-driven retries/resume - simpler recovery after connection loss.
  • Server can stream from disk - lower memory use.
  • Works with many existing tools/libraries (curl, aria2, OkHttp, NSURLSession, requests).

The existing upload-to-receiver can remain as a fallback.

We could also consider supporting the TUS protocol (open-source protocol for resumable uploads using HTTP): https://tus.io/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions