Chunk Upload
Overview
The objective of these methods is to enable uploads of large documents without incurring a timeout. We suggest using these methods for individual file sizes of 250KB and above; we require using these methods for individual file sizes of 3MB and above.
The following web service methods allow the user to upload a file or more asynchronously to submitting a fax for transmission. They allow the user to upload the data in parts, so as to avoid the file size and timeout limits of a single upload.
Once the upload has been completed, you may submit your fax for transmission, while referencing the SessionID of the upload you have just completed. A typical usage will use the StartFileUpload method once, then use the UploadFileChunk method multiple times, each time uploading a part of the data. Once the data has been uploaded completely, a call to a SendfaxEx_2 is made. The call will provide a reference to uploaded data instead of providing the data as a parameter.
Method Reference
StartFileUpload
Description: Starts an upload session. Should be called first.
Name | Type | Comments |
---|---|---|
Username | String | As provided during registration |
Password | String | As provided during registration |
Output
Name | Type | Comments |
---|---|---|
SessionID | String | SessionID is an InterFAX-returned string to be used in a subsequent fax submission. |
UploadFileChunk
Description: Sends a buffer to the InterFAX host. Buffer size may vary between calls.
Name | Type | Comments |
---|---|---|
SessionID | String | As received in the StartFileUpload method above. |
Chunk | base64Binary | Chunk of the file to be uploaded. Can be up to 3 MB. Recommended chunk size is between 50,000 to 200,000 bytes. The maximum total file size (of all chunks) is 20 MB. |
IsLast | Boolean | Is this the last chunk or not. |
Output
Name | Type | Comments |
---|---|---|
UploadFileChunkResult | Integer | Any positive value = OK. The value indicates the total number of bytes uploaded so far. -150 = System error -1061 = Missing chunk -1062 = SessionID incorrect -1063 = Total file size too big |
CancelFileUpload
Description: Cancels an already started session. There is no need to use it at the end of an upload session.
Name | Type | Comments |
---|---|---|
SessionID | String | SessionID of the active upload to be cancelled. |