|
@@ -28,15 +28,12 @@ import java.util.Iterator;
|
|
|
import java.util.Set;
|
|
|
import java.util.concurrent.atomic.AtomicBoolean;
|
|
|
|
|
|
-import org.apache.commons.httpclient.HttpException;
|
|
|
import org.apache.commons.httpclient.methods.PutMethod;
|
|
|
import org.apache.commons.httpclient.methods.RequestEntity;
|
|
|
-import org.apache.http.HttpStatus;
|
|
|
|
|
|
import com.owncloud.android.datamodel.OCFile;
|
|
|
import com.owncloud.android.files.services.FileUploader;
|
|
|
import com.owncloud.android.oc_framework.network.ProgressiveDataTransferer;
|
|
|
-import com.owncloud.android.oc_framework.network.webdav.FileRequestEntity;
|
|
|
import com.owncloud.android.oc_framework.network.webdav.OnDatatransferProgressListener;
|
|
|
import com.owncloud.android.oc_framework.network.webdav.WebdavClient;
|
|
|
import com.owncloud.android.oc_framework.operations.OperationCancelledException;
|
|
@@ -273,7 +270,7 @@ public class UploadFileOperation extends RemoteOperation {
|
|
|
localCopyPassed = true;
|
|
|
|
|
|
|
|
|
- if (mChunked) {
|
|
|
+ if ( mChunked && (new File(mFile.getStoragePath())).length() > ChunkedUploadRemoteFileOperation.CHUNK_SIZE ) {
|
|
|
mUploadOperation = new ChunkedUploadRemoteFileOperation(mFile.getStoragePath(), mFile.getRemotePath(),
|
|
|
mFile.getMimetype());
|
|
|
} else {
|
|
@@ -372,29 +369,6 @@ public class UploadFileOperation extends RemoteOperation {
|
|
|
mFile = newFile;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
|
|
|
* Checks if remotePath does not exist in the server and returns it, or adds
|
|
|
* a suffix to it in order to avoid the server file is overwritten.
|