mirror of
				https://github.com/owncloud/android-library.git
				synced 2025-10-31 10:27:45 +00:00 
			
		
		
		
	Make requireEtag nullable
This commit is contained in:
		
							parent
							
								
									c6b41e42c5
								
							
						
					
					
						commit
						0de5cd0b38
					
				| @ -55,7 +55,7 @@ open class UploadFileFromFileSystemOperation( | ||||
|     val remotePath: String, | ||||
|     val mimeType: String, | ||||
|     val lastModifiedTimestamp: String, | ||||
|     val requiredEtag: String, | ||||
|     val requiredEtag: String?, | ||||
| ) : RemoteOperation<Unit>() { | ||||
| 
 | ||||
|     protected val cancellationRequested = AtomicBoolean(false) | ||||
| @ -98,7 +98,7 @@ open class UploadFileFromFileSystemOperation( | ||||
| 
 | ||||
|         putMethod = PutMethod(URL(client.userFilesWebDavUri.toString() + WebdavUtils.encodePath(remotePath)), fileRequestBody!!).apply { | ||||
|             setRetryOnConnectionFailure(false) | ||||
|             if (requiredEtag.isNotBlank()) { | ||||
|             if (!requiredEtag.isNullOrBlank()) { | ||||
|                 addRequestHeader(HttpConstants.IF_MATCH_HEADER, requiredEtag) | ||||
|             } | ||||
|             addRequestHeader(HttpConstants.OC_TOTAL_LENGTH_HEADER, fileToUpload.length().toString()) | ||||
|  | ||||
| @ -54,7 +54,7 @@ class ChunkedUploadFromFileSystemOperation( | ||||
|     remotePath: String, | ||||
|     mimeType: String, | ||||
|     lastModifiedTimestamp: String, | ||||
|     requiredEtag: String, | ||||
|     requiredEtag: String?, | ||||
| ) : UploadFileFromFileSystemOperation( | ||||
|     localPath = localPath, | ||||
|     remotePath = remotePath, | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user