From 80b4fc396c1461e147fd92fe751848a0457df297 Mon Sep 17 00:00:00 2001 From: Robert Abeyta Date: Mon, 18 May 2015 13:34:40 -0700 Subject: [PATCH] based on options for outputType, add base64 encoded string or file_uri to resultStrings --- src/ios/SOSPicker.m | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ios/SOSPicker.m b/src/ios/SOSPicker.m index 912345e..a8439ad 100644 --- a/src/ios/SOSPicker.m +++ b/src/ios/SOSPicker.m @@ -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]]; + } } }