tus / tus-android-client

The tus client for Android.
https://tus.io/
161 stars 46 forks source link

Termiant or Abort #64

Open sn026628 opened 2 years ago

sn026628 commented 2 years ago

Question 1) In tus android library , how we can terminate or abort a on going upload from client side ? 2) While a upload is in process, when I try to send a delete request, i get response 423 file currently locked. How to resolve

Setup details Please provide following details, if applicable to your situation:

Acconut commented 2 years ago
  1. In tus android library , how we can terminate or abort a on going upload from client side ?

tus-java-client currently has no method to terminate or delete an upload. You would have to send the HTTP DELETE request on your own.

2. While a upload is in process, when I try to send a delete request, i get response 423 file currently locked. How to resolve

You first have to stop the upload and wait for the PATCH request to be over. Have a look at the example application: https://github.com/tus/tus-android-client/blob/master/example/src/main/java/io/tus/android/example/MainActivity.java The logic behind the pause button shows how to interrupt and stop the tus upload. After waiting for a short delay, you can send your DELETE request.