new icons, new uploader
[pub/Android/ownCloud.git] / src / eu / alefzero / webdav / WebdavClient.java
index 1416d17..4b719fb 100644 (file)
@@ -31,6 +31,7 @@ import org.apache.commons.httpclient.auth.AuthScope;
 import org.apache.commons.httpclient.methods.GetMethod;\r
 import org.apache.commons.httpclient.methods.HeadMethod;\r
 import org.apache.commons.httpclient.methods.PutMethod;\r
+import org.apache.commons.httpclient.methods.RequestEntity;\r
 import org.apache.commons.httpclient.params.HttpMethodParams;\r
 import org.apache.commons.httpclient.protocol.Protocol;
 import org.apache.http.HttpStatus;\r
@@ -102,10 +103,14 @@ public class WebdavClient extends HttpClient {
                   String contentType) {
     boolean result = true;
 
-    try {
-      FileRequestEntity entity = new FileRequestEntity(new File(localFile), contentType);\r
-      PutMethod put = new PutMethod(mUri.toString() + remoteTarget.substring(1));\r
+    try {\r
+      Log.e("ASD", contentType+"");\r
+      File f = new File(localFile);
+      RequestEntity entity = new FileRequestEntity(f, contentType);\r
+      Log.e("ASD", f.exists()+" " + entity.getContentLength());\r
+      PutMethod put = new PutMethod(mUri.toString() + remoteTarget);\r
       put.setRequestEntity(entity);\r
+      Log.d(TAG, "" + put.getURI().toString());\r
       int status = executeMethod(put);\r
       Log.d(TAG, "PUT method return with status "+status);