From d1783152dc983f33d027b6707ee3225ef09e9eb1 Mon Sep 17 00:00:00 2001 From: Salakar Date: Sat, 14 Jul 2018 23:34:57 +0100 Subject: [PATCH 1/2] [ios][storage] fix #739 --- ios/RNFirebase/storage/RNFirebaseStorage.m | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ios/RNFirebase/storage/RNFirebaseStorage.m b/ios/RNFirebase/storage/RNFirebaseStorage.m index fac5986b..7d879724 100644 --- a/ios/RNFirebase/storage/RNFirebaseStorage.m +++ b/ios/RNFirebase/storage/RNFirebaseStorage.m @@ -231,11 +231,15 @@ RCT_EXPORT_METHOD(putFile:(NSString *) appDisplayName options.networkAccessAllowed = true; [[PHImageManager defaultManager] requestImageDataForAsset:asset options:options resultHandler:^(NSData *imageData, NSString *dataUTI, UIImageOrientation orientation, NSDictionary *info) { if (info[PHImageErrorKey] == nil) { - if (UTTypeConformsTo((__bridge CFStringRef)dataUTI, kUTTypeJPEG)) { + if ( + UTTypeConformsTo((__bridge CFStringRef) dataUTI, kUTTypeJPEG) || + UTTypeConformsTo((__bridge CFStringRef) dataUTI, kUTTypePNG) || + UTTypeConformsTo((__bridge CFStringRef) dataUTI, kUTTypeGIF) + ) { firmetadata.contentType = [self utiToMimeType:dataUTI]; [self uploadData:appDisplayName data:imageData firmetadata:firmetadata path:path resolver:resolve rejecter:reject]; } else { - // if the image UTI is not JPEG then convert to JPEG, e.g. HEI + // all other image types are converted to JPEG, e.g. HEI CGImageSourceRef source = CGImageSourceCreateWithData((__bridge CFDataRef)imageData, NULL); NSDictionary *imageInfo = (__bridge NSDictionary*)CGImageSourceCopyPropertiesAtIndex(source, 0, NULL); NSDictionary *imageMetadata = [imageInfo copy]; From 947825c8ee094f264da6f87d49299a171fe1a4b6 Mon Sep 17 00:00:00 2001 From: Salakar Date: Sat, 14 Jul 2018 23:35:04 +0100 Subject: [PATCH 2/2] 4.3.7 --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9a025b04..ec1b6a13 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "react-native-firebase", - "version": "4.3.6", + "version": "4.3.7", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index ff8a3a2d..dd0aa9bc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-firebase", - "version": "4.3.6", + "version": "4.3.7", "author": "Invertase (http://invertase.io)", "description": "A well tested, feature rich Firebase implementation for React Native, supporting iOS & Android. Individual module support for Admob, Analytics, Auth, Crash Reporting, Cloud Firestore, Database, Dynamic Links, Functions, Messaging (FCM), Remote Config, Storage and more.", "main": "dist/index.js",