cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

API Download Progress

nborrerojr.
7-Bedrock

API Download Progress

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.

1 ACCEPTED SOLUTION

Accepted Solutions
KaelLizak
14-Alexandrite
(To:nborrerojr.)

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


Kind Regards,
Kael Lizak

Senior Technical Support Engineer
PTC Integrity Lifecycle Manager

View solution in original post

1 REPLY 1
KaelLizak
14-Alexandrite
(To:nborrerojr.)

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


Kind Regards,
Kael Lizak

Senior Technical Support Engineer
PTC Integrity Lifecycle Manager
Top Tags