Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handling packages from the DriveNode class≈ #11

Open
tibexl opened this issue Aug 21, 2020 · 0 comments
Open

Handling packages from the DriveNode class≈ #11

tibexl opened this issue Aug 21, 2020 · 0 comments

Comments

@tibexl
Copy link

tibexl commented Aug 21, 2020

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())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant