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

API Download Progress

SOLVED
Highlighted
Regular Member

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.

Tags (2)
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: API Download Progress

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
Highlighted

Re: API Download Progress

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

Announcements