GetImageChunk

Description

This method enables the retrieval of an inbound fax (image). By calling this method, you will download a piece (chunk) of the fax image. If the size of the chunk is smaller than the actual message size, you will have to loop through these requests until you have downloaded all of the chunks of the fax image (In order to know when to terminate the loop, keep downloading chunks until you download a chunk with size 0 – this will signal that the previous chunk was the last piece of the fax image). The size of the chunk can be changed dynamically between each requests, we recommend using a chunk size of approximately 10,000 bytes.

Formal Definition

https://ws.interfax.net/inbound.asmx?op=GetImageChunk

Input

Name Type Comments
Username String As provided during registration
Password String As provided during registration
MessageID Integer Message ID of the transaction to download
MarkAsRead Boolean True – mark as read. False – doesn’t change the current status
ChunkSize Long Buffer size to download. Maximum download size is defined in System Limitations.
From Long Starting point of the image to write to the buffer

Output

Name Type Comments
GetImageChunkResult Integer Return value: Integer
0 – OK
< 0 – Error, see Appendix A
Image base64Binary Output parameter: byte array of the image part that you requested (according to the buffer size and from start point)