based on options for outputType, add base64 encoded string or file_uri to resultStrings

This commit is contained in:
Robert Abeyta
2015-05-18 13:34:40 -07:00
parent 8bd64c7181
commit 80b4fc396c
+5 -1
View File
@@ -101,7 +101,11 @@ typedef enum : NSUInteger {
result = [CDVPluginResult resultWithStatus:CDVCommandStatus_IO_EXCEPTION messageAsString:[err localizedDescription]];
break;
} else {
[resultStrings addObject:[[NSURL fileURLWithPath:filePath] absoluteString]];
if(self.outputType == BASE64_STRING){
[resultStrings addObject:[data base64EncodedStringWithOptions:NSDataBase64Encoding64CharacterLineLength]];
} else {
[resultStrings addObject:[[NSURL fileURLWithPath:filePath] absoluteString]];
}
}
}