3.3.3.4 Step 4: Scan the file to ensure Upload was Successful
Scan the file that was uploaded to the Object Store of your Profitability and Balance Sheet Management Cloud Service by:
- Submitting a RESTful API Put Request to your Cloud Service as defined by the code snippet below:
File Scanning Code Snippet – Using File ID from Step 2 – Generate PAR URL
if [ $last_error -eq 0 ]; then
echo -e "\n *****Scanning the File *****"
curl -k --location --request PUT "$SCANURL/$FINALFILEID" --header 'ofs_tenant_id: $TENANT' --header 'ofs_service_id: OFS_FTP' --header 'ofs_workspace_id: WS001' --header "Authorization: Bearer $access_token"
last_error=$?
if [ $last_error -eq 0 ]; then
echo -e "\n ***File Upload is Successful please check File Upload / Download UI***"
else
echo "Scan failed"
exit -2;
fi
else
echo "Upload failed"
exit -3;
fi