Skip to main content
Skip table of contents

5.2 File Drop-Off (Flow to Thru MFT)

Drop-Off has two use cases.

  • 'Push' transport starts with a file loaded from the enterprise

  • 'Private exchange' transport process a file and a response is sent back to Thru MFT.

Drop-Off uploads a file to a Transport. A file is uploaded in chunks and file size is unlimited.
Drop-Off requires 'Thru MFT File Code' reservation which will link the file to the original source file (Private Exchange use case)

The rule is:

  • If the flow picked up a file from Thru MFT: The File Code of the source file should be preserved and used to Drop-Off files.

  • If a file comes from the enterprise and there is no File Code: File Code reservation API should be called before Drop-Off operation can be performed.

The following steps are required to implement Drop-Off operations. Contact us to get a code sample and get started quickly.

  1. Reserve File Code for future drop-off – optional, required only if File Code is not available.

  2. Send initial file metadata to be uploaded as json

  3. Send file data in chunks over HTTPS. Optionally can be implemented as a parallel upload of multiple chunks

  4. Send End-Of-File command

Notes:

  • Content should be sent as multi-part/form-data,

  • File name parameter should be set in Content-Disposition header by specific rules, ContentDisposition example is below:

Content-Disposition: form-data; name="file"; filename="FL00000001-ChunkNumber000001"; size=100000

5.2.1 Drop-Off File Code Reservation

Code reservation is only needed for Push transport where there is no pickup file. If the transport is Private Exchange and there is a pickup file, you should use the Pickup File Code as drop off file prefix.

The system will use it to identify the transport and also to link the drop off file to the landing file.

Reserve a file code in Thru MFT for future upload (drop-off), the call should be used if a file was never tracked in Thru MFT system and doesn't have a File Code.

Method

Request Url

GET

api/TransportMgr/FlowDropOffChunk/<Flow Code>

Type

Parameter

Values

HEAD

Authorization

<TransportMgrAuthHeader>

URL_PARAM

Flow Code

String (TRN…)

Status

Response

Note

200

<File Code>

Unique File Code for file

403

Content contains access denied message

Invalid Authorization Header in API call.
Flow Code parameter in Transport does not match the Flow Code in Authorization header

500

Content contains exception (message and stack trace)

Failed to find the Transport, file code reservation failed.

5.2.2 Drop-Off Initial File metadata (Chunk Zero)

The call sends a metadata file to Thru MFT. It is required before sending actual data chunks to Thru MFT.

ContentDisposition header should have the following format: File Code_Chunk000000.txt

Method

Request Url

POST

api/TransportMgr/FlowDropOffChunk/<Flow Code>

Type

Parameter

Values

HEAD










HEAD
HEAD
HEAD
POST

Authorization










ContentDisposition: name
ContentDisposition: filename
ContentDisposition: size
{
"fileSize": 100,"fileName": "FL5885807902-file1", "TargetSiteUrl": "mftdevrepo0011-002.thruinc.com"
}

<TransportMgrAuthHeader>

Note that header has the prefix 'TransportMgrAuthHeader<space>' and then the encrypted string.

Example:

TransportMgrAuthHeader 6BF3cJ/8DX6hjKQ12XJE…


"file"
"<File Code>_Chunk000000.txt"
int
Json string

File name in content disposition above has underscore as separator.

The file name inside the body (on the left) has dash as separator (not underscore).

URL_PARAM

Flow Code

Transport Code (TRN…)

Parameter

Value

File Code

File Code: Drop

File Size

Full file size in bytes

File Name

With prefix, like this<File Code>-<filename>

Status

Response

Note

200


Success

403

Content contains access denied message

Invalid Authorization Header in API call.
Flow Code parameter in Transport does not match the Flow Code in Authorization header

500

Content contains exception (message and stack trace)

Failed to find the flow, chunk upload failed or end of file processing failed

5.2.3 Test chunk zero multipart upload with Postman

To view the image below zoom to 200%.

5.2.4 Drop-Off Content Chunk

The call sends content chunks to Thru MFT. Optionally upload of chunks can be implemented in parallel processes. The full size of the file is unlimited.

The ContentDisposition header should have the following format: <File Code>_Chunk<chunk number>chunk number – number of chunk, starts with number 1 in following format 000001, 000002, … 000015, etc.

Method

Request Url

POST

api/TransportMgr/ FlowDropOffChunk/<Flow Code>

Type

Parameter

Values

HEAD
HEAD
HEAD
HEAD
POST

Authorization
ContentDisposition: name
ContentDisposition: filename
ContentDisposition: size Content of file chunk

<TransportMgrAuthHeader>
"file"
"<File Code>_Chunk<Chunk Number>"
int

URL_PARAM

Flow Code

Transport Code (TRN…)


Status

Response

Note

200


Drop-off success

403

Content contains access denied message

Invalid Authorization Header in API call.
Flow Code parameter in Transport does not match the Flow Code in Authorization header

500

Content contains exception (message and stack trace)

Failed to find the flow, chunk upload failed, end of file processing failed

5.2.5 Drop-Off End of File (EOF Chunk)

The call sends the indicator that the upload of a specific file is complete. Content-Disposition has the following format: EOF<File Code>

Method

Request Url

POST

api/TransportMgr/FlowDropOffChunk/<Flow Code>

Type

Parameter

Values

HEAD
HEAD
HEAD
HEAD
POST

Authorization
ContentDisposition: name
ContentDisposition: filename
ContentDisposition: size

<TransportMgrAuthHeader>
"file"
"EOF<File Code>"
int
No content

URL_PARAM

Flow Code

Transport Code (TRN…)

Status

Response

Note

200


Success

403

Content contains access denied message

Invalid Authorization Header in API call.
Flow Code parameter in Transport does not match the Flow Code in Authorization header

500

Content contains exception (message and stack trace)

Failed to find the flow, chunk upload failed, end of file processing failed

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.