box / box/box-python-sdk

Fallback from chunked to regular uploader for small files

未关闭
#569 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
enhancement
主要语言
Python
星标
459
派生
223
平均合并
8 小时 57 分钟
30 天内合并 PR
13

描述

### 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.

贡献指南

打开贡献指南

调研方向

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.

由索引模型根据 Issue 内容生成。

评估

技术栈
python
领域
api, backend
Issue 类型
功能
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。