<?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 Re: System.ArgumentNullException: when inititating concurrent upload in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/System-ArgumentNullException-when-inititating-concurrent-upload/m-p/522419#M25434</link>
    <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/10"&gt;@Greg-DB&lt;/a&gt;&amp;nbsp;- Have any pointers on the correct syntax to do this with Python?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 25 May 2021 00:36:37 GMT</pubDate>
    <dc:creator>9krausec</dc:creator>
    <dc:date>2021-05-25T00:36:37Z</dc:date>
    <item>
      <title>System.ArgumentNullException: when inititating concurrent upload</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/System-ArgumentNullException-when-inititating-concurrent-upload/m-p/477340#M24161</link>
      <description>&lt;P&gt;Hi, I've been working on a project and the requirement is to upload files to Dropbox concurrently and in chunks. So, I wrote the following code to accomplish the task.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I initiated the request using the following code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;public async Task&amp;lt;string&amp;gt; InitiateChunkUploadAsync(ProcessFileViewModel fileModel, CancellationToken cancellationToken)
        {
            try
            {
                _logger.LogInformation($"Initiating multi part upload to Dropbox.");

                var uploadSessionStartResult = await _client.Files.UploadSessionStartAsync(sessionType: UploadSessionType.Concurrent.Instance);
                
                return uploadSessionStartResult.SessionId;
            }
            catch (DropboxException ex)
            {
                _logger.LogError(ex, $"An error occurred while initiating multi part upload to Dropbox.");
            }
            catch (Exception ex)
            {
                _logger.LogError(ex, $"An error occurred while initiating multi part upload to Dropbox.");
            }
        }&lt;/PRE&gt;&lt;P&gt;and I'm getting the following error&lt;/P&gt;&lt;PRE&gt;System.ArgumentNullException: Value cannot be null. (Parameter 'body')
at MultiPartChunkUpload.Web.Services.Storage.DropboxUploadService.InitiateChunkUploadAsync(ProcessFileViewModel fileModel, CancellationToken cancellationToken) in ...
at MultiPartChunkUpload.Web.Controllers.FileController.SaveChunkOnDropBoxAsync(IFormFileCollection files, ChunkMetaData chunkMetaData, ChunkUploadFileResult chunkUploadFileResult, CancellationToken cancellationToken) in ...
at MultiPartChunkUpload.Web.Controllers.FileController.SaveToCloud(CloudProvider cloudProvider, IFormFileCollection files, ChunkMetaData chunkMetaData, CancellationToken cancellationToken) ...
at MultiPartChunkUpload.Web.Controllers.FileController.ChunkSave(IFormFileCollection files, String metaData, CancellationToken cancellationToken) in ...&lt;/PRE&gt;&lt;P&gt;When I tried to add body in the &lt;STRONG&gt;UploadSessionStartAsync, &lt;/STRONG&gt;as below&lt;/P&gt;&lt;PRE&gt;var uploadSessionStartResult = await _client.Files.UploadSessionStartAsync(sessionType: UploadSessionType.Concurrent.Instance, body: fileModel.Stream);&lt;/PRE&gt;&lt;P&gt;I got another error, which is expecting&lt;/P&gt;&lt;PRE&gt;Dropbox.Api.ApiException`1[Dropbox.Api.Files.UploadSessionStartError]: concurrent_session_data_not_allowed/
    at MultiPartChunkUpload.Web.Services.Storage.DropboxUploadService.InitiateChunkUploadAsync(ProcessFileViewModel fileModel, CancellationToken cancellationToken) in ...
    at MultiPartChunkUpload.Web.Controllers.FileController.SaveChunkOnDropBoxAsync(IFormFileCollection files, ChunkMetaData chunkMetaData, ChunkUploadFileResult chunkUploadFileResult, CancellationToken cancellationToken) in ...
    at MultiPartChunkUpload.Web.Controllers.FileController.SaveToCloud(CloudProvider cloudProvider, IFormFileCollection files, ChunkMetaData chunkMetaData, CancellationToken cancellationToken) in ...
    at MultiPartChunkUpload.Web.Controllers.FileController.ChunkSave(IFormFileCollection files, String metaData, CancellationToken cancellationToken) in ...; Request Id: 71753a2c841a4de284321c8aab374bdf&lt;/PRE&gt;&lt;P&gt;I've looked at the source code and found this&amp;nbsp;&lt;A href="https://github.com/dropbox/dropbox-sdk-dotnet/blob/de96458f9cabde2a4a43ce2a70d8ee318cac2c45/dropbox-sdk-dotnet/Dropbox.Api/DropboxRequestHandler.cs#L480" target="_blank" rel="noopener"&gt;line&lt;/A&gt; problematic. Looks like chunk concurrent operation is not yet implemented in .NET SDK.&lt;/P&gt;&lt;P&gt;Can someone please guide me if there is an error with my code or I figured it out correctly that this is not implemented? If not implemented yet, any workaround or when we expect this to be implemented?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Dec 2020 14:26:10 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/System-ArgumentNullException-when-inititating-concurrent-upload/m-p/477340#M24161</guid>
      <dc:creator>RealProgrammer</dc:creator>
      <dc:date>2020-12-08T14:26:10Z</dc:date>
    </item>
    <item>
      <title>Re: System.ArgumentNullException: when inititating concurrent upload</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/System-ArgumentNullException-when-inititating-concurrent-upload/m-p/477399#M24162</link>
      <description>&lt;P&gt;Apologies for the confusion. You can start a concurrent upload session in the .NET SDK by passing an empty body, like this:&lt;/P&gt;
&lt;PRE&gt;var uploadSessionStartResult = await _client.Files.UploadSessionStartAsync(sessionType: UploadSessionType.Concurrent.Instance, body: new MemoryStream());&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;I'll ask the team to see if we can update the SDK to make this easier/more obvious in the future.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Dec 2020 18:02:46 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/System-ArgumentNullException-when-inititating-concurrent-upload/m-p/477399#M24162</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2020-12-08T18:02:46Z</dc:date>
    </item>
    <item>
      <title>Re: System.ArgumentNullException: when inititating concurrent upload</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/System-ArgumentNullException-when-inititating-concurrent-upload/m-p/477569#M24165</link>
      <description>&lt;P&gt;Thanks for the help. Your answer did the trick.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Dec 2020 07:49:46 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/System-ArgumentNullException-when-inititating-concurrent-upload/m-p/477569#M24165</guid>
      <dc:creator>RealProgrammer</dc:creator>
      <dc:date>2020-12-09T07:49:46Z</dc:date>
    </item>
    <item>
      <title>Re: System.ArgumentNullException: when inititating concurrent upload</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/System-ArgumentNullException-when-inititating-concurrent-upload/m-p/522419#M25434</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/10"&gt;@Greg-DB&lt;/a&gt;&amp;nbsp;- Have any pointers on the correct syntax to do this with Python?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 May 2021 00:36:37 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/System-ArgumentNullException-when-inititating-concurrent-upload/m-p/522419#M25434</guid>
      <dc:creator>9krausec</dc:creator>
      <dc:date>2021-05-25T00:36:37Z</dc:date>
    </item>
    <item>
      <title>Re: System.ArgumentNullException: when inititating concurrent upload</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/System-ArgumentNullException-when-inititating-concurrent-upload/m-p/522557#M25439</link>
      <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1441823"&gt;@9krausec&lt;/a&gt; I don't believe we have a sample of this in Python handy unfortunately. I see you have an open ticket with support about this though so we'll take a look at that and follow up with you there.&lt;/P&gt;</description>
      <pubDate>Tue, 25 May 2021 15:43:17 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/System-ArgumentNullException-when-inititating-concurrent-upload/m-p/522557#M25439</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2021-05-25T15:43:17Z</dc:date>
    </item>
  </channel>
</rss>

