You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 29, 2021. It is now read-only.
Repository navigation
This repository was archived by the owner on Nov 29, 2021. It is now read-only.
UploadFileAsync never calls success or failure callback #81
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.
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?
Activity
mhenry1384 commentedon Dec 5, 2012
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.
dkarzon commentedon Dec 7, 2012
Ahh, thanks for the heads up, I'll have a look at fixing the unit tests and upping the required RestSharp version.
derigel23 commentedon May 23, 2013
The same for AccountInfoAsync. Please, make DropNet depending on RestSharp as package - do not include library itself.
g0ran1 commentedon Apr 17, 2014
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?