Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
Hi everyone,
I'm trying to upload a ".dump" file (size 3gb) from Java to my Dropbox application, but I've an error because the max size is 150mb.
I'm not finding any examples online, how can I fix that?
Following my code:
public static FileMetadata uploadDBDump(SuiteConfiguration suiteConfiguration, MultipartFile fileToUpload,
String pathFileName) throws UploadErrorException, DbxException, IOException {
DbxClientV2 dropboxClient = getV2ClientDBDumps(suiteConfiguration);
ListFolderResult folderList = dropboxClient.files().listFolder("");
String dropBoxFolderId = null;
for (Metadata metadata : folderList.getEntries()) {
if (StringUtils.equalsIgnoreCase("/" + pathFileName, metadata.getPathLower())) {
dropboxClient.files().deleteV2(metadata.getPathDisplay());
break;
}
}
CreateFolderResult createFolderV2 = dropboxClient.files().createFolderV2("/" + pathFileName);
dropBoxFolderId = createFolderV2.getMetadata().getId();
UploadBuilder fileUploader = dropboxClient.files()
.uploadBuilder(dropBoxFolderId + "/" + fileToUpload.getOriginalFilename());
fileUploader.withMode(WriteMode.ADD).withMute(Boolean.TRUE).withAutorename(Boolean.TRUE);
FileMetadata uploadMetadata = fileUploader.uploadAndFinish(fileToUpload.getInputStream());
return uploadMetadata;
}
Thank you!
To upload large files, you should use the "upload sessions" functionality instead. You can find an example of doing so with the Dropbox Java SDK here.
To upload large files, you should use the "upload sessions" functionality instead. You can find an example of doing so with the Dropbox Java SDK here.
thank you, have a nice day!
Hi there!
If you need more help you can view your support options (expected response time for a ticket is 24 hours), or contact us on X or Facebook.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!