cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

OutOfMemoryError uploading large file from API V2 - Java

OutOfMemoryError uploading large file from API V2 - Java

GabrielSMF
New member | Level 2

Hi all,

I'm trying to upload a large file (24gb) from Java using the Droopbox API V2, but I have a Out Of Memory Error.

I'm using the next line to do the upload:

cli.files().uploadBuilder(file_path_dropbox).uploadAndFinish(in);

Where:

file_path_dropbox = The path to Dropbox

in = the InputStream generated from FileInputStream(pathLocalFile)

I had read that I can use the uploadSessionStart() to do large uploads, but I never used it previously and I don't find some example of this.

How can I fix it? 

 

Regards

1 Reply 1

Greg-DB
Dropbox Staff

The upload method you're using only officially supports files up to 150 MB. If you need to upload larger files, such as the 24 GB file you mentioned, you'll need to use upload sessions, like you said. You can find an example of doing so in the official Dropbox API v2 Java SDK here:

https://github.com/dropbox/dropbox-sdk-java/blob/master/examples/upload-file/src/main/java/com/dropb...

You can find the documentation for the upload session methods here:

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?