import org.apache.jackrabbit.webdav.MultiStatus;
import org.apache.jackrabbit.webdav.client.methods.PropFindMethod;
import org.apache.jackrabbit.webdav.MultiStatus;
import org.apache.jackrabbit.webdav.client.methods.PropFindMethod;
import com.owncloud.android.ui.activity.InstantUploadActivity;
import com.owncloud.android.ui.preview.PreviewImageActivity;
import com.owncloud.android.ui.preview.PreviewImageFragment;
import com.owncloud.android.ui.activity.InstantUploadActivity;
import com.owncloud.android.ui.preview.PreviewImageActivity;
import com.owncloud.android.ui.preview.PreviewImageFragment;
newUpload.setRemoteFolderToBeCreated();
}
mPendingUploads.putIfAbsent(uploadKey, newUpload); // Grants that the file only upload once time
newUpload.setRemoteFolderToBeCreated();
}
mPendingUploads.putIfAbsent(uploadKey, newUpload); // Grants that the file only upload once time
newUpload.addDatatransferProgressListener(this);
newUpload.addDatatransferProgressListener((FileUploaderBinder)mBinder);
requestedUploads.add(uploadKey);
newUpload.addDatatransferProgressListener(this);
newUpload.addDatatransferProgressListener((FileUploaderBinder)mBinder);
requestedUploads.add(uploadKey);
return false;
String targetKey = buildRemoteName(account, file);
synchronized (mPendingUploads) {
return false;
String targetKey = buildRemoteName(account, file);
synchronized (mPendingUploads) {
// this can be slow if there are many uploads :(
Iterator<String> it = mPendingUploads.keySet().iterator();
boolean found = false;
// this can be slow if there are many uploads :(
Iterator<String> it = mPendingUploads.keySet().iterator();
boolean found = false;
- propfind = new PropFindMethod(mUploadClient.getBaseUri()
- + WebdavUtils.encodePath(mCurrentUpload.getRemotePath()));
+ propfind = new PropFindMethod(mUploadClient.getBaseUri() + WebdavUtils.encodePath(mCurrentUpload.getRemotePath()),
+ DavConstants.PROPFIND_ALL_PROP,
+ DavConstants.DEPTH_0);
int status = mUploadClient.executeMethod(propfind);
boolean isMultiStatus = (status == HttpStatus.SC_MULTI_STATUS);
if (isMultiStatus) {
int status = mUploadClient.executeMethod(propfind);
boolean isMultiStatus = (status == HttpStatus.SC_MULTI_STATUS);
if (isMultiStatus) {