Merge pull request #168 from nextcloud/resumeChunkedUploads

resume chunked uploads
This commit is contained in:
Andy Scherzinger 2016-08-12 17:12:10 +02:00 committed by GitHub
commit 63b52c1d92
3 changed files with 5 additions and 3 deletions

View file

@ -33,7 +33,7 @@ dependencies {
/// dependencies for app building /// dependencies for app building
compile name: 'touch-image-view' compile name: 'touch-image-view'
compile 'com.github.nextcloud:android-library:1.0.1' compile 'com.github.nextcloud:android-library:1.0.2'
compile "com.android.support:support-v4:${supportLibraryVersion}" compile "com.android.support:support-v4:${supportLibraryVersion}"
compile "com.android.support:design:${supportLibraryVersion}" compile "com.android.support:design:${supportLibraryVersion}"
compile 'com.jakewharton:disklrucache:2.0.2' compile 'com.jakewharton:disklrucache:2.0.2'

View file

@ -26,6 +26,7 @@ import android.content.Context;
import android.content.pm.PackageInfo; import android.content.pm.PackageInfo;
import android.content.pm.PackageManager; import android.content.pm.PackageManager;
import android.os.Bundle; import android.os.Bundle;
import android.os.Environment;
import com.owncloud.android.authentication.PassCodeManager; import com.owncloud.android.authentication.PassCodeManager;
import com.owncloud.android.datamodel.ThumbnailsCacheManager; import com.owncloud.android.datamodel.ThumbnailsCacheManager;
@ -79,7 +80,8 @@ public class MainApp extends Application {
// Set folder for store logs // Set folder for store logs
Log_OC.setLogDataFolder(dataFolder); Log_OC.setLogDataFolder(dataFolder);
Log_OC.startLogging(); //TODO: to be changed/fixed whenever SD card support gets merged.
Log_OC.startLogging(Environment.getExternalStorageDirectory().getAbsolutePath());
Log_OC.d("Debug", "start logging"); Log_OC.d("Debug", "start logging");
} }

View file

@ -362,7 +362,7 @@ public class UploadFileOperation extends SyncOperation {
if ( mChunked && if ( mChunked &&
(new File(mFile.getStoragePath())).length() > (new File(mFile.getStoragePath())).length() >
ChunkedUploadRemoteFileOperation.CHUNK_SIZE ) { ChunkedUploadRemoteFileOperation.CHUNK_SIZE ) {
mUploadOperation = new ChunkedUploadRemoteFileOperation(mFile.getStoragePath(), mUploadOperation = new ChunkedUploadRemoteFileOperation(mContext, mFile.getStoragePath(),
mFile.getRemotePath(), mFile.getMimetype(), mFile.getEtagInConflict()); mFile.getRemotePath(), mFile.getMimetype(), mFile.getEtagInConflict());
} else { } else {
mUploadOperation = new UploadRemoteFileOperation(mFile.getStoragePath(), mUploadOperation = new UploadRemoteFileOperation(mFile.getStoragePath(),