File Download
IID: [1:{0001001F}]
This interface represents a bucket containing downloadable files. Downloads type-independent binary data. May utilize ranges to chunk download as needed.> Type Definitions
FilenameType ID: 0
The name of the file.
Encoding: 106
Length: 1024
Type: string
TypeType ID: 3
The MIME type of the file.
Encoding: 106
Length: 1024
Type: string
SizeType ID: 1
The size of the file.
MAX:
MIN:
Unit: bytes
Type: uint64
Start IndexType ID: 4
The start index position.
MAX:
MIN:
Unit:
Type: uint64
End IndexType ID: 5
The end index position.
MAX:
MIN:
Unit:
Type: uint64
ChecksumType ID: 2
The hash of the file, produced by SHA-256.
Length: 32
Type: blob
DataType ID: 6
Binary data.
Min Length: 0
Length: 4079686
Type: blob
Encoding: 106
Length: 1024
Type: string
TypeType ID: 3
Encoding: 106
Length: 1024
Type: string
SizeType ID: 1
MAX:
MIN:
Unit: bytes
Type: uint64
Start IndexType ID: 4
MAX:
MIN:
Unit:
Type: uint64
End IndexType ID: 5
MAX:
MIN:
Unit:
Type: uint64
ChecksumType ID: 2
Length: 32
Type: blob
DataType ID: 6
Min Length: 0
Length: 4079686
Type: blob
> Methods
Get InfoItem ID: 0
Get information about the file without downloading it.
Inputs:
0 - Filename - The filename of the file.
Outputs:
0 - Filename - The filename of the file.
1 - Size - The total size of the file.
2 - Checksum - The checksum of the file. Produced by SHA-256.
3 - Type - The MIME type of the file.
Get DataItem ID: 1
Get a range of data from a file.
Inputs:
0 - Filename - The filename of the file.
4 - Start Index - Gives the byte offset of the first byte in a range. Byte offsets start at zero.
5 - End Index - Gives the byte offset of the last byte in a range (inclusive). If this is greater than or equal to the length of the file, it is assumed to be equal to one less than the length of the file.
Outputs:
6 - Data - The range of data.
Get information about the file without downloading it.
Inputs:
0 - Filename - The filename of the file.
Outputs:
0 - Filename - The filename of the file.
1 - Size - The total size of the file.
2 - Checksum - The checksum of the file. Produced by SHA-256.
3 - Type - The MIME type of the file.
Get DataItem ID: 1
Get a range of data from a file.
Inputs:
0 - Filename - The filename of the file.
4 - Start Index - Gives the byte offset of the first byte in a range. Byte offsets start at zero.
5 - End Index - Gives the byte offset of the last byte in a range (inclusive). If this is greater than or equal to the length of the file, it is assumed to be equal to one less than the length of the file.
Outputs:
6 - Data - The range of data.
> Exceptions
MAX_SIZE_EXCEEDEDItem ID: 2
Indicates a maximum size for a value has been exceeded. INVALID_RANGEItem ID: 3
Indicates the requested range (Start Index to End Index) is not valid. FILE_NOT_FOUNDItem ID: 4
Indicates that the requested file could not be found. SERVER_ERRORItem ID: 5
Indicates an error has occurred on the server.
Indicates a maximum size for a value has been exceeded. INVALID_RANGEItem ID: 3
Indicates the requested range (Start Index to End Index) is not valid. FILE_NOT_FOUNDItem ID: 4
Indicates that the requested file could not be found. SERVER_ERRORItem ID: 5
Indicates an error has occurred on the server.