Uploading Files using the MFT Content API
The ThruContent API provides two primary methods for uploading files:
-
Simple Upload: Use it when you need to upload files in one chunk and you have a stable connection. It can usually be used for small files, but limited to 2G file size.
-
Chunked Upload: Use it when you need to upload a large file or when you have an unstable network connection. This upload method provides a mechanism to resume upload in case of a network issue or interruption. It also works for small files (less than chunk size), but has less performance in this case than Simple Upload.
Endpoint path
As part of the initiation upload process the client should provide the endpoint path where file should be uploaded, which is represented by string in following format:
"flow:{FlowCode}/endpoint:{EndpointCode}/flowendpoint:{Id}"
Upload API provides a way to upload files to some of the source flow endpoint types.
Related reference
For the full set of Upload endpoints, request/response schemas, headers, and security requirements, refer to Upload API reference.
Best practices
- Use Simple Upload for files < 100MB
- Use Chunked Upload for:
- Large files
- Unstable network connections
- Need to resume interrupted uploads
- Always perform a preflight check before uploading
- Handle potential errors and implement retry mechanisms
Common error scenarios
- 409 Conflict: Invalid file path
- Authentication failures
- Network interruptions during upload