X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/e76d4b00ef2c73bbbf17e7f30a0ee93156ce7d1c..64ddaf8d9ab7b2a10cba854d4577a3e792731f73:/src/com/owncloud/android/operations/UploadFileOperation.java diff --git a/src/com/owncloud/android/operations/UploadFileOperation.java b/src/com/owncloud/android/operations/UploadFileOperation.java index 7501fa12..b0b9466f 100644 --- a/src/com/owncloud/android/operations/UploadFileOperation.java +++ b/src/com/owncloud/android/operations/UploadFileOperation.java @@ -372,28 +372,28 @@ public class UploadFileOperation extends RemoteOperation { mFile = newFile; } - public boolean isSuccess(int status) { - return ((status == HttpStatus.SC_OK || status == HttpStatus.SC_CREATED || status == HttpStatus.SC_NO_CONTENT)); - } - - protected int uploadFile(WebdavClient client) throws HttpException, IOException, OperationCancelledException { - int status = -1; - try { - File f = new File(mFile.getStoragePath()); - mEntity = new FileRequestEntity(f, getMimeType()); - synchronized (mDataTransferListeners) { - ((ProgressiveDataTransferer)mEntity).addDatatransferProgressListeners(mDataTransferListeners); - } - mPutMethod.setRequestEntity(mEntity); - status = client.executeMethod(mPutMethod); - client.exhaustResponse(mPutMethod.getResponseBodyAsStream()); - - } finally { - mPutMethod.releaseConnection(); // let the connection available for - // other methods - } - return status; - } +// public boolean isSuccess(int status) { +// return ((status == HttpStatus.SC_OK || status == HttpStatus.SC_CREATED || status == HttpStatus.SC_NO_CONTENT)); +// } +// +// protected int uploadFile(WebdavClient client) throws HttpException, IOException, OperationCancelledException { +// int status = -1; +// try { +// File f = new File(mFile.getStoragePath()); +// mEntity = new FileRequestEntity(f, getMimeType()); +// synchronized (mDataTransferListeners) { +// ((ProgressiveDataTransferer)mEntity).addDatatransferProgressListeners(mDataTransferListeners); +// } +// mPutMethod.setRequestEntity(mEntity); +// status = client.executeMethod(mPutMethod); +// client.exhaustResponse(mPutMethod.getResponseBodyAsStream()); +// +// } finally { +// mPutMethod.releaseConnection(); // let the connection available for +// // other methods +// } +// return status; +// } /** * Checks if remotePath does not exist in the server and returns it, or adds