<?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: Dropbox API in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Dropbox-API/m-p/305145#M18404</link>
    <description>&lt;P&gt;Based on &lt;A href="https://www.dropboxforum.com/t5/API-Support-Feedback/Large-Data-Upload/m-p/305041" target="_blank"&gt;your newer thread&lt;/A&gt;, it sounds like you already sorted this out, so I'll follow up with you on your new question there.&lt;/P&gt;</description>
    <pubDate>Wed, 24 Oct 2018 16:14:14 GMT</pubDate>
    <dc:creator>Greg-DB</dc:creator>
    <dc:date>2018-10-24T16:14:14Z</dc:date>
    <item>
      <title>Dropbox API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Dropbox-API/m-p/304973#M18397</link>
      <description>&lt;P&gt;Have tried one of your examples for uploading larger files, getting on error on this line&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;updated = CType(ChunkUpload((filePath + ("/" + fileName)), fs, ChunkSize, dbx), Task(Of FileMetadata))&lt;/PRE&gt;&lt;P&gt;Additional information: Unable to cast object of type 'System.Threading.Tasks.Task`1[System.Threading.Tasks.VoidTaskResult]' to type 'System.Threading.Tasks.Task`1[Dropbox.Api.Files.FileMetadata]'.&lt;/P&gt;&lt;P&gt;it relatesd to the function below, which is cast as a task&lt;/P&gt;&lt;PRE&gt;Private Async Function ChunkUpload(ByVal path As String, ByVal stream As FileStream, ByVal chunkSize As Integer, dbx As DropboxClient) As Task
        Dim numChunks As Integer = CType(Math.Ceiling((CType(stream.Length, Double) / chunkSize)), Integer)
        Dim buffer() As Byte = New Byte((chunkSize) - 1) {}
        Dim sessionId As String = Nothing
        Dim idx = 0
        Do While (idx &amp;lt; numChunks)
            Dim byteRead = stream.Read(buffer, 0, chunkSize)
            Dim memStream = New MemoryStream(buffer, 0, byteRead)
            If (idx = 0) Then
                Dim result = dbx.Files.UploadSessionStartAsync(False, memStream)
                sessionId = CType(result.Id, String)
            Else
                Dim cursor = New UploadSessionCursor(sessionId, CType((chunkSize * idx), System.UInt64))
                If (idx _
                            = (numChunks - 1)) Then
                    Dim fileMetadata As FileMetadata = Await dbx.Files.UploadSessionFinishAsync(cursor, New CommitInfo(path), memStream)
                    Console.WriteLine(fileMetadata.PathDisplay)
                Else
                    Await dbx.Files.UploadSessionAppendV2Async(cursor, False, memStream)
                End If

            End If

            idx = (idx + 1)
        Loop

    End Function&lt;/PRE&gt;&lt;P&gt;Can you give any advice&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:09:41 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Dropbox-API/m-p/304973#M18397</guid>
      <dc:creator>solsupp</dc:creator>
      <dc:date>2019-05-29T09:09:41Z</dc:date>
    </item>
    <item>
      <title>Re: Dropbox API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Dropbox-API/m-p/305145#M18404</link>
      <description>&lt;P&gt;Based on &lt;A href="https://www.dropboxforum.com/t5/API-Support-Feedback/Large-Data-Upload/m-p/305041" target="_blank"&gt;your newer thread&lt;/A&gt;, it sounds like you already sorted this out, so I'll follow up with you on your new question there.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Oct 2018 16:14:14 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Dropbox-API/m-p/305145#M18404</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2018-10-24T16:14:14Z</dc:date>
    </item>
  </channel>
</rss>

