Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Allow chunked uploads (and maybe even streaming uploads)

Open
#459 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
50/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
python
Domain
api

Research direction

Start in dropbox_client.py around lines 533-539, where request bodies are restricted to bytes, and compare that behavior with the linked Requests streaming and chunked-upload documentation. Determine how the SDK should accept file-like objects or generators while documenting retry and rewind behavior; done means the chosen upload forms are supported without the current bytes-only restriction.

Written by the indexing model from the issue text.

Description

enhancement

Why is this feature valuable to you? Does it solve a problem you're having?
The requests library allows both streaming and chunked uploads (see https://requests.readthedocs.io/en/latest/user/advanced/#streaming-uploads and https://requests.readthedocs.io/en/latest/user/advanced/#chunk-encoded-requests). This has two benefits:

  1. It is sufficient to only load small parts of a file into memory before upload.
  2. It is possible to limit bandwidth usage by using a generator that provides chunks at a limited rate.

The Dropbox API of course already requires upload sessions (files/upload_session_start, files/upload_session_append and files/upload_session_finish) to upload files > 150 MB. However, this approach by itself does not replace chunked or streaming uploads because:

  1. The request body should be ideally >= 4 MB to reduce the total number of API calls (both for efficiency and to not exhaust data transport API call limits).
  2. Bandwidth control will be very coarse when performed on chunks of 4 MB compared for example 2 kB.
  3. Memory usage will still be larger compared to 1 kB or 2 kB chunks, especially for parallel uploads.

Describe the solution you'd like
Requests supports streaming uploads by passing a file-like object as the request body and chunked uploads by passing a generator as the request body. However, the Python SDK explicitly prevents both by requiring the request body to be of type bytes:

https://github.com/dropbox/dropbox-sdk-python/blob/9895d705317583cedb9fc11e5aa1f17f6bea303a/dropbox/dropbox_client.py#L533-L539

It would be good to either completely drop this limitation, with appropriate warnings in the doc string, or at least allow chunked uploads (where requests handles retry / rewind logic) even when disallowing streaming uploads.

Describe alternatives you've considered
Not at present.

Dominant language
Python
Stars
983
Forks
331
Avg merge
3m
Merged PRs (30d)
10

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from dropbox/dropbox-sdk-python

All issues in dropbox/dropbox-sdk-python

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.