Commit f51f103e authored by narinder Rana's avatar narinder Rana
Browse files

getting code for Download remote file

parent dda9730b
Pipeline #137883 passed with stage
in 2 minutes and 28 seconds
......@@ -24,6 +24,8 @@
*/
package foundation.e.drive.operations;
import android.util.Log;
import com.owncloud.android.lib.common.OwnCloudClient;
import com.owncloud.android.lib.common.network.WebdavUtils;
import com.owncloud.android.lib.common.operations.OperationCancelledException;
......@@ -77,6 +79,7 @@ class DownloadFileRemoteOperation extends RemoteOperation {
tmpFile.getParentFile().mkdirs();
int status = downloadFile(client, tmpFile);
result = new RemoteOperationResult(isSuccess(status), mGet);
Log_OC.i(TAG, "Download of " + mRemotePath + " to " + getTmpPath() + ": " +
result.getLogMessage());
......@@ -120,6 +123,9 @@ class DownloadFileRemoteOperation extends RemoteOperation {
fos.write(bytes, 0, readResult);
transferred += readResult;
}
Log.e(TAG, "....line no..127 ..."+targetFile.getName());
// Check if the file is completed
// if transfer-encoding: chunked we cannot check if the file is complete
Header transferEncodingHeader = mGet.getResponseHeader("Transfer-Encoding");
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment