The Chunked Upload API provides a way to reliably upload large files to Box by
chunking them into a sequence of parts that can be uploaded individually.By using this API the application uploads a file in part, allowing it to recover
from a failed request more reliably. It means an application only needs to
retry the upload of a single part instead of the entire file.An additional benefit of chunked uploads is that parts can be uploaded
in parallel, allowing for a potential performance improvement.
Chunked uploads require a sequence of API calls to be made.
Create an upload session: The application creates an upload session for a new file or new version of a file. The session defines the (new) name of the file, its size, and the parent folder.
Upload parts: The application uploads the separate parts of the file as chunks.
Commit session: The application commits the session, at which moment the integrity of the file is checked before it is placed in the location specified when the session was created.
The Chunked Upload API is intended for large files with a minimum size of 20MB.
The API does not support uploads of files with a size smaller than this.This API does not support re-uploading or overwriting of parts in a session.
Once a part has been uploaded, it is immutable.The lifetime of an upload session is 7 days. During this time, the client can
upload parts at their own pace.To avoid wasting resources, and avoid potential data corruption, client should
make sure that the underlying file has not been changed on disk since beginning
the upload.