<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic OutOfMemoryError uploading large file from API V2 - Java in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/OutOfMemoryError-uploading-large-file-from-API-V2-Java/m-p/688446#M30914</link>
    <description>&lt;P&gt;Hi everyone,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;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.&lt;BR /&gt;I'm not finding any examples online, how can I fix that?&lt;/P&gt;
&lt;P&gt;Following my code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;public static FileMetadata uploadDBDump(SuiteConfiguration suiteConfiguration, MultipartFile fileToUpload,&lt;BR /&gt;String pathFileName) throws UploadErrorException, DbxException, IOException {&lt;BR /&gt;DbxClientV2 dropboxClient = getV2ClientDBDumps(suiteConfiguration);&lt;BR /&gt;ListFolderResult folderList = dropboxClient.files().listFolder("");&lt;BR /&gt;String dropBoxFolderId = null;&lt;BR /&gt;for (Metadata metadata : folderList.getEntries()) {&lt;BR /&gt;if (StringUtils.equalsIgnoreCase("/" + pathFileName, metadata.getPathLower())) {&lt;BR /&gt;dropboxClient.files().deleteV2(metadata.getPathDisplay());&lt;BR /&gt;break;&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;CreateFolderResult createFolderV2 = dropboxClient.files().createFolderV2("/" + pathFileName);&lt;BR /&gt;dropBoxFolderId = createFolderV2.getMetadata().getId();&lt;/P&gt;
&lt;P&gt;UploadBuilder fileUploader = dropboxClient.files()&lt;BR /&gt;.uploadBuilder(dropBoxFolderId + "/" + fileToUpload.getOriginalFilename());&lt;BR /&gt;fileUploader.withMode(WriteMode.ADD).withMute(Boolean.TRUE).withAutorename(Boolean.TRUE);&lt;BR /&gt;FileMetadata uploadMetadata = fileUploader.uploadAndFinish(fileToUpload.getInputStream());&lt;BR /&gt;return uploadMetadata;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thank you!&lt;/P&gt;</description>
    <pubDate>Thu, 01 Jun 2023 17:04:33 GMT</pubDate>
    <dc:creator>developersSave</dc:creator>
    <dc:date>2023-06-01T17:04:33Z</dc:date>
    <item>
      <title>OutOfMemoryError uploading large file from API V2 - Java</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/OutOfMemoryError-uploading-large-file-from-API-V2-Java/m-p/688446#M30914</link>
      <description>&lt;P&gt;Hi everyone,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;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.&lt;BR /&gt;I'm not finding any examples online, how can I fix that?&lt;/P&gt;
&lt;P&gt;Following my code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;public static FileMetadata uploadDBDump(SuiteConfiguration suiteConfiguration, MultipartFile fileToUpload,&lt;BR /&gt;String pathFileName) throws UploadErrorException, DbxException, IOException {&lt;BR /&gt;DbxClientV2 dropboxClient = getV2ClientDBDumps(suiteConfiguration);&lt;BR /&gt;ListFolderResult folderList = dropboxClient.files().listFolder("");&lt;BR /&gt;String dropBoxFolderId = null;&lt;BR /&gt;for (Metadata metadata : folderList.getEntries()) {&lt;BR /&gt;if (StringUtils.equalsIgnoreCase("/" + pathFileName, metadata.getPathLower())) {&lt;BR /&gt;dropboxClient.files().deleteV2(metadata.getPathDisplay());&lt;BR /&gt;break;&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;CreateFolderResult createFolderV2 = dropboxClient.files().createFolderV2("/" + pathFileName);&lt;BR /&gt;dropBoxFolderId = createFolderV2.getMetadata().getId();&lt;/P&gt;
&lt;P&gt;UploadBuilder fileUploader = dropboxClient.files()&lt;BR /&gt;.uploadBuilder(dropBoxFolderId + "/" + fileToUpload.getOriginalFilename());&lt;BR /&gt;fileUploader.withMode(WriteMode.ADD).withMute(Boolean.TRUE).withAutorename(Boolean.TRUE);&lt;BR /&gt;FileMetadata uploadMetadata = fileUploader.uploadAndFinish(fileToUpload.getInputStream());&lt;BR /&gt;return uploadMetadata;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jun 2023 17:04:33 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/OutOfMemoryError-uploading-large-file-from-API-V2-Java/m-p/688446#M30914</guid>
      <dc:creator>developersSave</dc:creator>
      <dc:date>2023-06-01T17:04:33Z</dc:date>
    </item>
    <item>
      <title>Re: OutOfMemoryError uploading large file from API V2 - Java</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/OutOfMemoryError-uploading-large-file-from-API-V2-Java/m-p/688475#M30917</link>
      <description>&lt;P&gt;To upload large files, you should use the "upload sessions" functionality instead. You can find &lt;A href="https://github.com/dropbox/dropbox-sdk-java/blob/main/examples/examples/src/main/java/com/dropbox/core/examples/upload_file/UploadFileExample.java#L56" target="_blank"&gt;an example of doing so with the Dropbox Java SDK here&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jun 2023 17:03:30 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/OutOfMemoryError-uploading-large-file-from-API-V2-Java/m-p/688475#M30917</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2023-06-01T17:03:30Z</dc:date>
    </item>
    <item>
      <title>Re: OutOfMemoryError uploading large file from API V2 - Java</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/OutOfMemoryError-uploading-large-file-from-API-V2-Java/m-p/689732#M30936</link>
      <description>&lt;P&gt;thank you, have a nice day!&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jun 2023 07:26:31 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/OutOfMemoryError-uploading-large-file-from-API-V2-Java/m-p/689732#M30936</guid>
      <dc:creator>developersSave</dc:creator>
      <dc:date>2023-06-06T07:26:31Z</dc:date>
    </item>
  </channel>
</rss>

