mirror of
https://github.com/apache/cordova-plugin-file-transfer.git
synced 2026-04-28 00:02:49 +08:00
CB-9969 Filetransfer upload error deletes original file
Adds corresponding test and fixes for iOS and Windows Also fixes filetransfer.spec.9, which used an incorrect path in the root.getFile call.
This commit is contained in:
@@ -631,7 +631,9 @@ static CFIndex WriteDataToStream(NSData* data, CFWriteStreamRef stream)
|
||||
delegate.backgroundTaskID = UIBackgroundTaskInvalid;
|
||||
}
|
||||
|
||||
[self removeTargetFile];
|
||||
if (self.direction == CDV_TRANSFER_DOWNLOAD) {
|
||||
[self removeTargetFile];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)cancelTransferWithError:(NSURLConnection*)connection errorMessage:(NSString*)errorMessage
|
||||
|
||||
Reference in New Issue
Block a user