dropbox / dropbox/SwiftyDropbox

No progress updates when executing a batch upload with small files

Open
#219 10 comments 0 reactions 0 assignees View on GitHub
Dominant language
Swift
Stars
721
Forks
218
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.