Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fallback from chunked to regular uploader for small files #569

Open
supermitch opened this issue Nov 23, 2020 · 2 comments
Open

Fallback from chunked to regular uploader for small files #569

supermitch opened this issue Nov 23, 2020 · 2 comments

Comments

@supermitch
Copy link

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.

@sujaygarlanka
Copy link
Contributor

@supermitch Thanks for the complement and feedback! We will log this suggestion. It may be a while before we get to this though because of the current size of the team and other priorities. If you are interested, please feel free to submit a PR and we can hopefully get it reviewed and merged soon.

@justquick
Copy link

ended up implementing this myself anyway in my project. does the min file size depend on any account settings? if so, does the API need to fetch that info ahead of time in order to determine which method to use? if so, that's another API call so it wouldnt b worth it at that point

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants