Fallback from chunked to regular uploader for small files

Open
#569 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
python
Domain
api, backend

Research direction

Start by tracing the chunked uploader and the folder.upload(path) entry point described in the issue, then compare how each handles files below the chunked-upload minimum. Define the generic upload behavior and its completed-upload expectations before implementing it, and verify both small-file fallback and regular chunked uploads with tests.

Written by the indexing model from the issue text.

Description

enhancement
Is your feature request related to a problem? Please describe.

When I run the chunked uploader on a too-small file size, I get the following:

boxsdk.exception.BoxAPIException: Message: File size 302023 less than minimum allowed for this API: 20000000
Status: 400
Code: file_size_too_small
Describe the solution you'd like

Allow a generic upload function that falls back to the default uploading if chunked uploader refuses the file.

I realize this might be a bit high level, but considering how smooth most of the SDK is (thank you!) I feel like the folder upload (folder.upload(path)) is so clean and simple it would be a simple fallback for the chunked uploader.

Describe alternatives you've considered

The alternative is a file size check, two code paths, etc.

Dominant language
Python
Stars
460
Forks
223
Avg merge
14h 18m
Merged PRs (30d)
21

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 box/box-python-sdk

All issues in box/box-python-sdk

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.