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
Currently its quite difficult to handle a failed upload using TusPatchWithChunkAsync. If the upload fails while uploading a following chunk it returs the response of the previous (succeeded) chunk. If I now check the reponse for succeeded statuscode its not correct. I would need to check the size as well 8as you do it in the OnCompletedAsync callback.
Using the OnCompletedAsync callback to check for a suceeded call is a lot lines of code to write. If you could add a bool property 'UploadSuceeded' to the TusPatchResponse I could check easily for a succeeded call.
So, at the end of the TusPatchWithChunkAsync method just add following line: tusPatchResponse.UploadSuceeded = (totalSize == uploadedSize);
Than, a caller could just do like that: var result = await httpClient.TusPatchAsync(tusPatchRequestOption, cancellationToken); return result.UploadSuceeded;
The text was updated successfully, but these errors were encountered:
Currently its quite difficult to handle a failed upload using TusPatchWithChunkAsync. If the upload fails while uploading a following chunk it returs the response of the previous (succeeded) chunk. If I now check the reponse for succeeded statuscode its not correct. I would need to check the size as well 8as you do it in the OnCompletedAsync callback.
Using the OnCompletedAsync callback to check for a suceeded call is a lot lines of code to write. If you could add a bool property 'UploadSuceeded' to the TusPatchResponse I could check easily for a succeeded call.
So, at the end of the TusPatchWithChunkAsync method just add following line:
tusPatchResponse.UploadSuceeded = (totalSize == uploadedSize);
Than, a caller could just do like that:
var result = await httpClient.TusPatchAsync(tusPatchRequestOption, cancellationToken); return result.UploadSuceeded;
The text was updated successfully, but these errors were encountered: