} else {
newUpload = new UploadFileOperation(account, files[i], isInstant, forceOverwrite, localAction);
}
- if (fixed && i == 0) {
+ if (isInstant) {
newUpload.setRemoteFolderToBeCreated();
}
- mPendingUploads.putIfAbsent(uploadKey, newUpload);
+ mPendingUploads.putIfAbsent(uploadKey, newUpload); // Grants that the file only upload once time
+ Log_OC.d(TAG, "Trying to update "+ uploadKey);
newUpload.addDatatransferProgressListener(this);
newUpload.addDatatransferProgressListener((FileUploaderBinder)mBinder);
requestedUploads.add(uploadKey);