Skip to main content
Question

To avoid downloading documents for security reasons

  • May 22, 2025
  • 2 replies
  • 13 views

Forum|alt.badge.img

Hello folks,

                    I have a requirement where in we are using Box APIs from Box cloud to GCP. We are dealing with gigs of data and don't want to move documents from one cloud to the other. We merely want to examine contents of the documents. My question is is it possible to do that without physically transferring documents from one location to the other. In other words if there is a streaming version of Box APIs. I'm asking this question from a security perspective. My client is doesn't feel comfortable copying sensitive documents from one cloud to the other. I'm curious if there is a way around it.

Thanks,

Satish

2 replies

Forum|alt.badge.img

Hi Satish,

The way that you'll probably want to handle this is by downloading the file from box (example / guide here) to a server-side app. This will create a read stream for the file and allow inspection of the content.

- Jon


Forum|alt.badge.img

Hi Jcleblanc,

I am using this example code but I am getting exception.

BoxAPIConnection dummyAppUserconnection = (BoxAPIConnection) dummyAppUserboxConnectionPool.getTarget();
BoxFile file = new BoxFile(dummyAppUserconnection, fileId);
BoxFile.Info info = file.getInfo();
FileOutputStream stream = new FileOutputStream(info.getName());
file.download(stream);
stream.close();

 

Getting This Exception

com.box.sdk.BoxAPIResponseException: The API returned an error code [404] 404.7010.0001 - The requested resource was not found