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]; 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",