Skip to content

Uploading Files with Progress #32

Open

Description

@oranaise2412

First things first, thx a million for this api its really good i got downloading with progress to work but i m still stuck at reporting progress when uploading files. I saw your ChunckUpload method and added this here to it var percentage = 100 * ((chunkSize * idx) / (double)stream.Length); int pValue = (int)Math.Ceiling((decimal)percentage); this.progressBar1.BeginInvoke((MethodInvoker)delegate() { progressBar1.Value = pValue; }); well the progressbar moves to 80 and stops there after the file is already uploaded.If you dont mind please add a small method or correct my code so all can enjoy your great api :)

Activity

  1. greg-db commented on Jul 21, 2016

    @greg-db
    Contributor

    @oranaise2412 It's hard to say what the problem may be here without seeing the rest of the code, but it sounds like the your code here to update the progress bar just isn't getting called when the final chunked upload call is made.

    That is, maybe you're only calling this when UploadSessionAppend is called, but not when UploadSessionFinish is called? The final call to UploadSessionFinish can contain the last piece of data.

    In any case, we'll consider this a feature request for easier progress listeners in the SDK.

  2. oranaise2412 commented on Jul 22, 2016

    @oranaise2412
    Author

    Thx for that quick reply ! Mind showing me a sample of uploading files with progressbar ?

  3. greg-db commented on Jul 22, 2016

    @greg-db
    Contributor

    I don't have an example like that to share unfortunately. Exactly how you connect it to your app's UI will depend on your app anyway, of course.

  4. oranaise2412 commented on Jul 22, 2016

    @oranaise2412
    Author

    Well i m building a Dropbox manager in winforms i was quite happy when downloading with progress worked so i thought about uploading with progress, but could not get further with my code

  5. oranaise2412 commented on Jul 22, 2016

    @oranaise2412
    Author
  6. facebookegypt commented on Apr 22, 2020

    @facebookegypt

    Any progress in this issue ?

  7. greg-db commented on Apr 23, 2020

    @greg-db
    Contributor

    @facebookegypt No, unfortunately the Dropbox .NET SDK still doesn't offer native progress listeners, so you'd need to implement progress reporting in between chunks when uploading via upload sessions as discussed above.

  8. IamSierraCharlie commented on Apr 25, 2020

    @IamSierraCharlie

    Hi, I have taken your direction in progress reporting based around chunks. It works okay albeit a little bit clunky. It will do for now. I do have one question though about your comment "no native listeners"... does that also mean there is no actual way to report the speed of the upload or download using the SDK? I can open another issue, but I felt it was related to this one hence me asking here.

  9. greg-db commented on Apr 27, 2020

    @greg-db
    Contributor

    @IamSierraCharlie That's correct, while you can track progress by chunks as you mentioned, my earlier comment is referring to the fact that the Dropbox .NET SDK does not currently offer a way to track the progress of an upload during any single upload request (such as over the course of the upload of a single chunk). We'll add your feedback to this feature request. Thanks!

  10. facebookegypt commented on May 1, 2020

    @facebookegypt

    @greg-db
    Native progress listener : You mean to track progress in the DropBox side, right?
    Because, I'm able to track ChunkUpload Progress in a desktop Project using VB .Net.

  11. greg-db commented on May 1, 2020

    @greg-db
    Contributor

    @facebookegypt Yes, the feature request is for functionality that would be provided by the Dropbox SDK to inform your code of how much progress has been made in the upload to Dropbox, during the individual request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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