Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X
Is there any way to get a progress of an attachment download when im extractattachments is used? Basically I am trying to find out when an attachment has finished downloading. Do any of the different response types give this? (IResponse, ICreationResponse, IActionResponse, IBaseResponse, IViewResponse)
I am using the API for Integrity 10.5.
Solved! Go to Solution.
Hello Nolin,
The API doesn't provide this information.
Your best bet would seem to be something along these lines:
1. Get the file name & size from the attachment field
2. Make sure the file doesn't already exist in the target download directory
3. Monitor the file size periodically, until the file size matches the file size on the attachment field. This last part could be tricky, because file size on disk might not be the same as the actual file size, due to how your operating system manages file space allocation. In this last case, you might want to assume the download is complete if the file is within a certain tolerance of the expected file size and hasn't changed after a certain number of checks.
I hope that helps.
Regards,
Kael
Hello Nolin,
The API doesn't provide this information.
Your best bet would seem to be something along these lines:
1. Get the file name & size from the attachment field
2. Make sure the file doesn't already exist in the target download directory
3. Monitor the file size periodically, until the file size matches the file size on the attachment field. This last part could be tricky, because file size on disk might not be the same as the actual file size, due to how your operating system manages file space allocation. In this last case, you might want to assume the download is complete if the file is within a certain tolerance of the expected file size and hasn't changed after a certain number of checks.
I hope that helps.
Regards,
Kael