From a1b6191ec960b68e388ee8a2093c7b76a90ea4fa Mon Sep 17 00:00:00 2001 From: Benjamin Reed Date: Sun, 7 Feb 2016 14:35:02 -0500 Subject: [PATCH] don't write to a temp url if it's already a local file url --- src/ios/PhotoViewer.m | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ios/PhotoViewer.m b/src/ios/PhotoViewer.m index be8d161..4eb5366 100644 --- a/src/ios/PhotoViewer.m +++ b/src/ios/PhotoViewer.m @@ -89,6 +89,9 @@ - (NSURL *)localFileURLForImage:(NSString *)image NSURL *tmpDirURL = [NSURL fileURLWithPath:NSTemporaryDirectory() isDirectory:YES]; NSString *filename = [[NSUUID UUID] UUIDString]; NSURL *fileURL = [NSURL URLWithString:image]; + if ([fileURL isFileReferenceURL]) { + return fileURL; + } NSData *data = [NSData dataWithContentsOfURL:fileURL];