← 输入框|github.com|刷新
Skip to content
This repository was archived by the owner on Nov 29, 2021. It is now read-only.
This repository was archived by the owner on Nov 29, 2021. It is now read-only.

UploadFileAsync never calls success or failure callback #81

Open

Description

@mhenry1384

UploadFileAsync() succeeds but it never calls the success callback. Your unit test (Can_Upload_File_Async()) does not check for that.

Activity

  1. mhenry1384 commented on Dec 5, 2012

    @mhenry1384
    Author

    Looks like updating to the latest RestSharp (104.1.0.0) via NuGet fixes this.
    Still, your unit tests should be checking for this. You can use an AutoResetEvent at the end of the async tests to block for x milliseconds. If you don't get a success (or failure) in the x milliseconds, the test should fail.

  2. dkarzon commented on Dec 7, 2012

    @dkarzon
    Member

    Ahh, thanks for the heads up, I'll have a look at fixing the unit tests and upping the required RestSharp version.

  3. derigel23 commented on May 23, 2013

    @derigel23
    Contributor

    The same for AccountInfoAsync. Please, make DropNet depending on RestSharp as package - do not include library itself.

  4. g0ran1 commented on Apr 17, 2014

    @g0ran1

    So how can I call a simple code after successful async upload?
    I use this code:
    _client.UploadFileAsync("/Folder/", filMyFile.PostedFile.FileName, binaryData,
    (success) =>
    {
    lbl.Text = "upload complete"; //Whatever I do here there is no effect
    }
    (failure) =>
    {
    //Do something on error
    });
    Please give an example of what can be done in response of success?

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