Merge pull request #1301 from invertase/master
Update v4.3.x branch from master
This commit is contained in:
commit
d8e3a7d467
|
@ -231,11 +231,15 @@ RCT_EXPORT_METHOD(putFile:(NSString *) appDisplayName
|
||||||
options.networkAccessAllowed = true;
|
options.networkAccessAllowed = true;
|
||||||
[[PHImageManager defaultManager] requestImageDataForAsset:asset options:options resultHandler:^(NSData *imageData, NSString *dataUTI, UIImageOrientation orientation, NSDictionary *info) {
|
[[PHImageManager defaultManager] requestImageDataForAsset:asset options:options resultHandler:^(NSData *imageData, NSString *dataUTI, UIImageOrientation orientation, NSDictionary *info) {
|
||||||
if (info[PHImageErrorKey] == nil) {
|
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];
|
firmetadata.contentType = [self utiToMimeType:dataUTI];
|
||||||
[self uploadData:appDisplayName data:imageData firmetadata:firmetadata path:path resolver:resolve rejecter:reject];
|
[self uploadData:appDisplayName data:imageData firmetadata:firmetadata path:path resolver:resolve rejecter:reject];
|
||||||
} else {
|
} 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);
|
CGImageSourceRef source = CGImageSourceCreateWithData((__bridge CFDataRef)imageData, NULL);
|
||||||
NSDictionary *imageInfo = (__bridge NSDictionary*)CGImageSourceCopyPropertiesAtIndex(source, 0, NULL);
|
NSDictionary *imageInfo = (__bridge NSDictionary*)CGImageSourceCopyPropertiesAtIndex(source, 0, NULL);
|
||||||
NSDictionary *imageMetadata = [imageInfo copy];
|
NSDictionary *imageMetadata = [imageInfo copy];
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "react-native-firebase",
|
"name": "react-native-firebase",
|
||||||
"version": "4.3.6",
|
"version": "4.3.7",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "react-native-firebase",
|
"name": "react-native-firebase",
|
||||||
"version": "4.3.6",
|
"version": "4.3.7",
|
||||||
"author": "Invertase <contact@invertase.io> (http://invertase.io)",
|
"author": "Invertase <contact@invertase.io> (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.",
|
"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",
|
"main": "dist/index.js",
|
||||||
|
|
Loading…
Reference in New Issue