Implementation Recommendations: Qualifying file sizes (ascp vs. API request)
This article is intended for all Fulfillment Partners who utilize our Backlot APIs for delivery and those who have future development plans.
Our API requires that the asset file size from the ascp command actually matches the file size in the request that was made to the API. This is done to prevent files from being swapped unintentionally after a transfer has started.
As such, we have a few recommendations we wanted to share with you to ensure that your Backlot API deliveries will be seamless:
1. We recommend making the transfer spec API request right before files are ready to be uploaded (rather than making the API request while the files are still being edited).
2. We also recommend using the --file-pair-list option in ascp to do the download so that ascp will create the folder structures if they do not exist.
Details on of how to use ascp with —file-pair-list are listed here:
*Note: The sourcePath and destinationPath from the API response can go directly into —file-pair-list file in pair. Please make sure to keep them in the same order as the API response.