Level up your Box knowledge with brand new learning paths on Box University. Visit training.box.com to get started

To avoid downloading documents for security reasons

New post

Comments

2 comments

  • Official comment
    jcleblanc

    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

    Comment actions Permalink
  • satyajit Nayak

    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

    0
    Comment actions Permalink

Please sign in to leave a comment.