Open tibexl opened 4 years ago
When the stored objet is a package (eg a Capture one package), the result does not contain a data_token object but a package object (package_token), which also contains a URL.
Map<String, Object> dataTokenMap = (Map<String, Object>) result.get("data_token"); String contentUrl = (String) dataTokenMap.get("url");
In this case it seems that the package file needs to get downloaded differently. HttpGet contentRequest = new HttpGet(contentUrl);
try (InputStream inputStream = iCloudService.getHttpClient().execute(contentRequest).getEntity().getContent())
When the stored objet is a package (eg a Capture one package), the result does not contain a data_token object but a package object (package_token), which also contains a URL.
In this case it seems that the package file needs to get downloaded differently.
HttpGet contentRequest = new HttpGet(contentUrl);