Box Developer Documentation
 

    Chunked Upload with SDKs

    Chunked Upload with SDKs

    The Box SDKs make it possible to perform a chunked upload with the built-in SDK methods.

    Java
    File myFile = new File("My Large_File.txt"); 
    FileInputStream stream = new FileInputStream(myFile);
    
    BoxFolder rootFolder = BoxFolder.getRootFolder(api);
    BoxFile.Info fileInfo = rootFolder.uploadLargeFile(inputStream, "My_Large_File.txt", myFile.length());

    The SDKs also support uploading new versions of files through similar methods.

    Java
    File myFile = new File("My Large_File.txt"); 
    FileInputStream stream = new FileInputStream(myFile);
    
    String fileID = "12345";
    BoxFile file = new BoxFile(api, fileID);
    BoxFile.Info fileInfo = file.uploadLargeFile(inputStream, myFile.length());