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
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);