Skip to content

No progress updates when executing a batch upload with small files #219

@gertjanvg

Description

@gertjanvg

I have been working on an application that uploads a bunch of photos to Dropbox. All of the photos are pretty small and I used the batch upload method available in Dropbox to upload all of them. Everything worked, up until the point I wanted to track the progress of the upload process. I passed a BatchUploadResponseBlock as parameter for FilesRoutes.batchUploadFiles, but no progress is being reported.

Diving into the source code revealed the following issue: there are two different types of file uploading: small files and large files. Since all of my files were small all of them were passed to the startUploadSmallFile method. It turned out that startUploadSmallFile does not actually ever call self.executeProgressHandler, which results in no progress being reported at all.

I have not yet tested whether this lack of reporting results in incorrect progress reporting when mixing small and large files, but my guess is it does. This obviously is an issue because one would expect progress from an upload task, especially a batched task.

For now I have put in place a quick bugfix, but a more elegant solution should be found. I will most likely submit a pull request later on with a better solution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions