Forum Discussion

SWworker's avatar
SWworker
Explorer | Level 4
6 years ago
Solved

Develop Android app to upload large file to Dropbox. Failed all the times.

Hi,

    I currently develop Android app for user to upload their files to Dropbox. My app can upload <300MB file to user's Dropbox account. But large file is failed all the times. 

    My development environment is Windows 10 and use Android Studio IDE.     I had updated dropbox SDK version to 3.1.1 in Gradle build. And refered to official sample code as below:

DbxRequestConfig requestConfig = DbxRequestConfig.newBuilder("APP Name")
.build();
mDbxClient = new DbxClientV2(requestConfig, accessToken);

    Then I see the log "com.dropbox.core.BadResponseCodeException: unexpected HTTP status code: 413: null" when error happened. Please help me to fix this issue.  Thanks!

    • SWworker's avatar
      SWworker
      Explorer | Level 4

      Hi Greg,

          Thank you first.

          I have a question about CHUNKED_UPLOAD_CHUNK_SIZE. In sample code, it has a description "Use a multiple of 4MiB for your chunk size". My question is can I set this value smaller than 4MB?  Is 32KB ok?

      Thanks!!