Constructor
(private) new Chunk(client, sessionID, chunk, offset, totalSize, options)
    Create a Chunk, representing a part of a file being uploaded
    Parameters:
| Name | Type | Description | ||||||
|---|---|---|---|---|---|---|---|---|
client | 
            
            BoxClient | The Box SDK client | ||||||
sessionID | 
            
            string | The ID of the upload session the chunk belongs to | ||||||
chunk | 
            
            Buffer | string | The chunk that was uploaded | ||||||
offset | 
            
            int | The byte offset within the file where this chunk begins | ||||||
totalSize | 
            
            int | The total size of the file this chunk belongs to | ||||||
options | 
            
            Object | The options from the ChunkedUploader
                Properties
  | 
        
- Source:
 
Classes
Methods
cancel() → {void}
    Cancel trying to upload a chunk, preventing it from retrying and clearing
the associated buffer
- Source:
 
Returns:
- Type
 - void
 
cancel() → {void}
    Cancel trying to upload a chunk, preventing it from retrying and clearing
the associated buffer
- Source:
 
Returns:
- Type
 - void
 
getData() → {UploadPart}
    Get the final object representation of this chunk for the API
- Source:
 
Returns:
    The chunk object
- Type
 - UploadPart
 
getData() → {UploadPart}
    Get the final object representation of this chunk for the API
- Source:
 
Returns:
    The chunk object
- Type
 - UploadPart
 
upload() → {void}
    Upload a chunk to the API
- Source:
 
Fires:
- Chunk#event:uploaded
 - Chunk#event:error
 
Returns:
- Type
 - void
 
upload() → {void}
    Upload a chunk to the API
- Source:
 
Fires:
- Chunk#event:uploaded
 - Chunk#event:error
 
Returns:
- Type
 - void