mirror of
				https://github.com/owncloud/android-library.git
				synced 2025-10-31 10:27:45 +00:00 
			
		
		
		
	Merge pull request #60 from owncloud/adding_account_versions
Adding account versions
This commit is contained in:
		
						commit
						8ca001af3e
					
				| @ -350,12 +350,18 @@ public class AccountUtils { | |||||||
| 	    public static final String KEY_SUPPORTS_SAML_WEB_SSO = "oc_supports_saml_web_sso"; | 	    public static final String KEY_SUPPORTS_SAML_WEB_SSO = "oc_supports_saml_web_sso"; | ||||||
| 	    /** | 	    /** | ||||||
| 	    * Flag signaling if the ownCloud server supports Share API" | 	    * Flag signaling if the ownCloud server supports Share API" | ||||||
| 	    */ |         * @deprecated | ||||||
|  |         */ | ||||||
| 	    public static final String KEY_SUPPORTS_SHARE_API = "oc_supports_share_api"; | 	    public static final String KEY_SUPPORTS_SHARE_API = "oc_supports_share_api"; | ||||||
| 	    /** | 	    /** | ||||||
| 	     * OC accout cookies | 	     * OC account cookies | ||||||
| 	     */ | 	     */ | ||||||
| 	    public static final String KEY_COOKIES = "oc_account_cookies"; | 	    public static final String KEY_COOKIES = "oc_account_cookies"; | ||||||
| 	} | 
 | ||||||
|  |         /** | ||||||
|  |          * OC account version | ||||||
|  |          */ | ||||||
|  |         public static final String KEY_OC_ACCOUNT_VERSION = "oc_account_version"; | ||||||
|  |     } | ||||||
| 
 | 
 | ||||||
| } | } | ||||||
|  | |||||||
| @ -75,7 +75,8 @@ public class ChunkedUploadRemoteFileOperation extends UploadRemoteFileOperation | |||||||
|                 } |                 } | ||||||
|                 mPutMethod = new PutMethod(uriPrefix + chunkCount + "-" + chunkIndex); |                 mPutMethod = new PutMethod(uriPrefix + chunkCount + "-" + chunkIndex); | ||||||
|                 mPutMethod.addRequestHeader(OC_CHUNKED_HEADER, OC_CHUNKED_HEADER); |                 mPutMethod.addRequestHeader(OC_CHUNKED_HEADER, OC_CHUNKED_HEADER); | ||||||
|                 ((ChunkFromFileChannelRequestEntity)mEntity).setOffset(offset); |                 mPutMethod.addRequestHeader(OC_TOTAL_LENGTH_HEADER, String.valueOf(file.length())); | ||||||
|  |                 ((ChunkFromFileChannelRequestEntity) mEntity).setOffset(offset); | ||||||
|                 mPutMethod.setRequestEntity(mEntity); |                 mPutMethod.setRequestEntity(mEntity); | ||||||
|                 status = client.executeMethod(mPutMethod); |                 status = client.executeMethod(mPutMethod); | ||||||
|                 client.exhaustResponse(mPutMethod.getResponseBodyAsStream()); |                 client.exhaustResponse(mPutMethod.getResponseBodyAsStream()); | ||||||
|  | |||||||
| @ -53,6 +53,7 @@ import com.owncloud.android.lib.common.operations.RemoteOperationResult; | |||||||
| 
 | 
 | ||||||
| public class UploadRemoteFileOperation extends RemoteOperation { | public class UploadRemoteFileOperation extends RemoteOperation { | ||||||
| 
 | 
 | ||||||
|  | 	protected static final String OC_TOTAL_LENGTH_HEADER = "OC-Total-Length"; | ||||||
| 
 | 
 | ||||||
| 	protected String mLocalPath; | 	protected String mLocalPath; | ||||||
| 	protected String mRemotePath; | 	protected String mRemotePath; | ||||||
| @ -116,6 +117,7 @@ public class UploadRemoteFileOperation extends RemoteOperation { | |||||||
| 				((ProgressiveDataTransferer)mEntity) | 				((ProgressiveDataTransferer)mEntity) | ||||||
|                         .addDatatransferProgressListeners(mDataTransferListeners); |                         .addDatatransferProgressListeners(mDataTransferListeners); | ||||||
| 			} | 			} | ||||||
|  | 			mPutMethod.addRequestHeader(OC_TOTAL_LENGTH_HEADER, String.valueOf(f.length())); | ||||||
| 			mPutMethod.setRequestEntity(mEntity); | 			mPutMethod.setRequestEntity(mEntity); | ||||||
| 			status = client.executeMethod(mPutMethod); | 			status = client.executeMethod(mPutMethod); | ||||||
| 			client.exhaustResponse(mPutMethod.getResponseBodyAsStream()); | 			client.exhaustResponse(mPutMethod.getResponseBodyAsStream()); | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user