@@ -18,19 +18,22 @@ func (c *Client) GetList(ctx context.Context, listenr int, body interface{}) (io
18
18
logDebug (ctx , c , fmt .Sprintf ("Error on create list: %v, PxSession-ID: %v" , resp , PxSessionId ))
19
19
return resp , headers , status , err
20
20
}
21
- downloadLocation := headers .Get ("Location" )
21
+
22
+ // Build Download Uri - was change in Px Rest-API 4.43 / 4.42. This fix works for all...
23
+ dateiNr := ConvertLocationToID (headers )
24
+ downloadUri := "PRO/Datei/" + dateiNr
22
25
23
26
//If Log enabled log URL
24
- logDebug (ctx , c , fmt .Sprintf ("Got Download URL from PROFFIX REST-API: %v, PxSession-ID: %v" , downloadLocation , PxSessionId ))
27
+ logDebug (ctx , c , fmt .Sprintf ("Got Download URL from PROFFIX REST-API: %v, PxSession-ID: %v" , downloadUri , PxSessionId ))
25
28
26
- downloadFile , headersDownload , statusDownload , err := c .Get (ctx , downloadLocation , nil )
29
+ downloadFile , headersDownload , statusDownload , err := c .Get (ctx , downloadUri , nil )
27
30
28
31
if headersDownload == nil {
29
32
headersDownload = http.Header {}
30
33
}
31
34
32
35
//If Log enabled log URL
33
- logDebug (ctx , c , fmt .Sprintf ("Downloaded File from '%v' with Content-Length: %v, PxSession-ID: %v" , downloadLocation , headersDownload .Get ("Content-Length" ), PxSessionId ))
36
+ logDebug (ctx , c , fmt .Sprintf ("Downloaded File from '%v' with Content-Length: %v, PxSession-ID: %v" , downloadUri , headersDownload .Get ("Content-Length" ), PxSessionId ))
34
37
35
38
return downloadFile , headersDownload , statusDownload , err
36
39
0 commit comments