Outbound Web Service with Incremental Data 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 actually 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 (or the older SendfaxEx) 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 |
| StartFileUploadResult |
Integer |
0 = OK
-1003 = not authenticated
-150 = System error |
| SessionID |
String |
SessionID is an InterFAX-returned string to be used in: 1.) subsequent UploadFileChunk submissions, and 2.) 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.
Note: Once a fax is submitted using this SessionID, the SessionID is terminated and cannot be reused.
|
| 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. |
| UploadFileChunkResult |
Integer |
Greater than 0 = OK (The number indicates the cumulative bytes received 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. |
| CancelFileUploadResult |
Integer |
0 = OK
-150 = System Error |
|