mirror of
https://github.com/apache/cordova-plugin-file-transfer.git
synced 2026-04-28 00:02:49 +08:00
iOS: Update for new file plugin api
This commit is contained in:
@@ -617,9 +617,9 @@ static CFIndex WriteDataToStream(NSData* data, CFWriteStreamRef stream)
|
||||
// Download response is okay; begin streaming output to file
|
||||
NSString *filePath = nil;
|
||||
CDVFilesystemURL *sourceURL = [CDVFilesystemURL fileSystemURLWithString:self.target];
|
||||
if (sourceURL && sourceURL.fileSystemType != -1) {
|
||||
if (sourceURL && sourceURL.fileSystemName != nil) {
|
||||
// This requires talking to the current CDVFile plugin
|
||||
NSObject<CDVFileSystem> *fs = [filePlugin.fileSystems objectAtIndex:sourceURL.fileSystemType];
|
||||
NSObject<CDVFileSystem> *fs = [filePlugin filesystemForURL:sourceURL];
|
||||
filePath = [fs filesystemPathForURL:sourceURL];
|
||||
} else {
|
||||
// Extract the path part out of a file: URL.
|
||||
|
||||
Reference in New Issue
Block a user